# Pod pending state

**URL:** <https://discuss.kubernetes.io/t/pod-pending-state/18112>\
**Category:** General Discussions\
**Tags:** podcast\
**Created:** [November 16, 2021, 5:58pm UTC](https://discuss.kubernetes.io/t/pod-pending-state/18112 "2021-11-16T17:58:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryangga](https://avatars.discourse-cdn.com/v4/letter/r/67e7ee/32.png) [@ryangga](https://discuss.kubernetes.io/u/ryangga)\
**Post date:** [November 16, 2021, 5:58pm UTC](https://discuss.kubernetes.io/t/pod-pending-state/18112/1 "2021-11-16T17:58:25Z")

</div>

I’m just learning to use Kubernetes and I’m confused why my pod is still pending,  
I tried to debug it, and show it like this

 ![Screenshot (599)](https://us1.discourse-cdn.com/flex016/uploads/kubernetes/original/2X/c/c596c5a3c4d72cb63a571b2635e5112c5e72d199.png)

my yaml code

```auto
apiVersion: v1
kind: Pod
metadata:
  name: posts
spec:
  containers:
    - name: posts
      image: ryangga/posts:0.0.1 

```

this is just basic so it’s simple. my Kubernetes is running smoothly, I have searched for it on google and asked on StackOverflow but I can’t find the answer. is there something I’m missing?

---

<div class="post-metadata">

**Author:** ![xavi](https://avatars.discourse-cdn.com/v4/letter/x/8e8cbc/32.png) [@xavi](https://discuss.kubernetes.io/u/xavi)\
**Post date:** [November 16, 2021, 6:39pm UTC](https://discuss.kubernetes.io/t/pod-pending-state/18112/2 "2021-11-16T18:39:51Z")

</div>

Documentation states that pods remain in pending state if they can not be scheduled: [Troubleshoot Applications | Kubernetes](https://kubernetes.io/docs/tasks/debug-application-cluster/debug-application/#debugging-pods)

In the output of the describe pod command, on the Tolerations sections, the node is tainted as not-ready and unreacheable ([Taints and Tolerations | Kubernetes](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)).

My next move would be to run kubectl get nodes -o wide to see if any of the nodes is shown as not ready.

---

<div class="post-metadata">

**Author:** ![ryangga](https://avatars.discourse-cdn.com/v4/letter/r/67e7ee/32.png) [@ryangga](https://discuss.kubernetes.io/u/ryangga)\
**Post date:** [November 16, 2021, 7:03pm UTC](https://discuss.kubernetes.io/t/pod-pending-state/18112/3 "2021-11-16T19:03:12Z")

</div>

![Screenshot (596)](https://us1.discourse-cdn.com/flex016/uploads/kubernetes/original/2X/f/f32206f21750008e1d4c8dcfccacaa74b781fde0.png)

I also wanted to include this earlier, but due to new user restrictions, I can only use one image media. This is my question on stackoverflow for more details

[https://stackoverflow.com/questions/69965562/pod-pending-state-kubernetes](https://stackoverflow.com/questions/69965562/pod-pending-state-kubernetes)

---

<div class="post-metadata">

**Author:** ![xavi](https://avatars.discourse-cdn.com/v4/letter/x/8e8cbc/32.png) [@xavi](https://discuss.kubernetes.io/u/xavi)\
**Post date:** [November 16, 2021, 7:21pm UTC](https://discuss.kubernetes.io/t/pod-pending-state/18112/4 "2021-11-16T19:21:26Z")

</div>

You have only one node and has the “MASTER” role; by default, master nodes are not elegible to schedule workloads (they are used only to manage the cluster).

Try joining a new node to the cluster (a WORKER node) or remove the taint from the master node ([https://computingforgeeks.com/how-to-schedule-pods-on-kubernetes-control-plane-node/](https://computingforgeeks.com/how-to-schedule-pods-on-kubernetes-control-plane-node/) is the first result searching in Google for “kubernetes schedule pod in master node” 😉)

---

<div class="post-metadata">

**Author:** ![ryangga](https://avatars.discourse-cdn.com/v4/letter/r/67e7ee/32.png) [@ryangga](https://discuss.kubernetes.io/u/ryangga)\
**Post date:** [November 16, 2021, 7:56pm UTC](https://discuss.kubernetes.io/t/pod-pending-state/18112/5 "2021-11-16T19:56:43Z")

</div>

I have removed taint on my master node but my pod is still pending

 ![Screenshot (600)](https://us1.discourse-cdn.com/flex016/uploads/kubernetes/original/2X/b/b3ff1d16e936e922ad5da3b5374c6fb6ccb0a5c3.png)

---

<div class="post-metadata">

**Author:** ![xavi](https://avatars.discourse-cdn.com/v4/letter/x/8e8cbc/32.png) [@xavi](https://discuss.kubernetes.io/u/xavi)\
**Post date:** [November 16, 2021, 8:06pm UTC](https://discuss.kubernetes.io/t/pod-pending-state/18112/6 "2021-11-16T20:06:49Z")

</div>

Cloud you please run `kubectl get nodes -o wide` again to check if the node has been “un-tainted”? If I am not mistaken, to remove a taint you must suffix the “taint” with a “-” at the end… So the command to remove the “taint” from the node would be `kubectl taint node docker-desktop node-role.kubernetes.io/master:NoSchedule-` (notice the “-” after the NoSchedule).

---

<div class="post-metadata">

**Author:** ![ryangga](https://avatars.discourse-cdn.com/v4/letter/r/67e7ee/32.png) [@ryangga](https://discuss.kubernetes.io/u/ryangga)\
**Post date:** [November 16, 2021, 8:21pm UTC](https://discuss.kubernetes.io/t/pod-pending-state/18112/7 "2021-11-16T20:21:15Z")

</div>

Is it like this?

 ![Screenshot (601)](https://us1.discourse-cdn.com/flex016/uploads/kubernetes/original/2X/3/3ffd53b245dd728f14ce2055c2e615926c217789.png)

this is a really weird error.

---

<div class="post-metadata">

**Author:** ![xavi](https://avatars.discourse-cdn.com/v4/letter/x/8e8cbc/32.png) [@xavi](https://discuss.kubernetes.io/u/xavi)\
**Post date:** [November 16, 2021, 8:42pm UTC](https://discuss.kubernetes.io/t/pod-pending-state/18112/8 "2021-11-16T20:42:58Z")

</div>

Ok, let’s be positive… What about the output of `kubectl describe node docker-desktop`?  
Is there any other taint that may prevent scheduling pods on the node? Is the field `Unschedulable: true`? What about the `Conditions:` section of the output? At the end of the output there is an `Allocated resources` section that will display how much resources are currently used by pods running in the cluster (kubernetes deploys various components to the `kube-system` namespace).

P.S I’ve failed to locate a funny (or sad) tweet: “How to live a miserable life in 4 words: ‘Install and use Kubernetes’” 😃

---

<div class="post-metadata">

**Author:** ![ryangga](https://avatars.discourse-cdn.com/v4/letter/r/67e7ee/32.png) [@ryangga](https://discuss.kubernetes.io/u/ryangga)\
**Post date:** [November 17, 2021, 6:47pm UTC](https://discuss.kubernetes.io/t/pod-pending-state/18112/9 "2021-11-17T18:47:46Z")

</div>

thanks for helping me to solve this error. now the pod is running after I reset my docker and Kubernetes. Looks like I made a mistake yesterday, I accidentally reset the cluster while installing Kubernetes. maybe that’s the cause. I’m so dumb 😙

 ![Screenshot (602)](https://us1.discourse-cdn.com/flex016/uploads/kubernetes/original/2X/a/a7b8bc4cdcdac5cca70e85e6a9f5d227bc5a28a5.png)

---

<div class="post-metadata">

**Author:** ![xavi](https://avatars.discourse-cdn.com/v4/letter/x/8e8cbc/32.png) [@xavi](https://discuss.kubernetes.io/u/xavi)\
**Post date:** [November 17, 2021, 7:02pm UTC](https://discuss.kubernetes.io/t/pod-pending-state/18112/10 "2021-11-17T19:02:11Z")

</div>

![](https://us1.discourse-cdn.com/flex016/uploads/kubernetes/original/2X/3/31f32468e24ac16d54e932ed5801ae3e9f0f94ad.gif)

😃
