Kubernets cluster pod stays in pending state

0 votes
I've created a kubernetes cluster on my linux machine. The problem is one of my pod is still in the pending stage. Is there a way to troubleshoot this?
Oct 26, 2018 in Kubernetes by Hannah
• 18,070 points
11,922 views

5 answers to this question.

0 votes

If a Pod is stuck in Pending it means that it can not be scheduled onto a node. Generally this is because there are insufficient resources of one type or another that prevent scheduling. Look at the output of the kubectl describe ... command above. There should be messages from the scheduler about why it can not schedule your pod. Reasons include:

  • You don’t have enough resources: You may have exhausted the supply of CPU or Memory in your cluster, in this case you need to delete Pods, adjust resource requests, or add new nodes to your cluster. See Compute Resources document for more information.

  • You are using hostPort: When you bind a Pod to a hostPort there are a limited number of places that pod can be scheduled. In most cases, hostPort is unnecessary, try using a Service object to expose your Pod. If you do require hostPort then you can only schedule as many Pods as there are nodes in your Kubernetes cluster.

answered Oct 26, 2018 by Kalgi
• 51,890 points
0 votes

Have a look at the Kubernetes cluster troubleshoot guide: https://kubernetes.io/docs/tasks/debug-application-cluster/debug-application/

answered May 3, 2019 by Bryan
0 votes

This issue strikes when the pod is unable to connect to the master server. This is very common when you set up an EKS cluster. These are two things you need to keep in mind for the cluster to be fine.

  • Enable private endpoint access so that the worker node or pod under VPC is able to connect
  • Setup security group and map with EKS cluster setup. Do not forget to add worker security group in the ingress rule with 443 port access.
answered May 3, 2019 by Vishal
0 votes
Hey, I had the exact same issue. I don't know what the problem was but I reset the cluster and created it again and it worked fine for me. If somebody knows the reason, please do let me know! Thanks
answered May 3, 2019 by Gita
0 votes
I had the same issue. I spent days trying to figure out the solution. So the problem was there was a mismatch with the hostname in master and the clients. Very ashamed of this stupidity but such mistakes can give you very annoying errors.
answered May 3, 2019 by Kashish

Related Questions In Kubernetes

+2 votes
3 answers

Calico-kube-controllers and coredns are in Pending status and not coming to Running State

root@kmaster:/home/master# kubectl get pods -o wide --all-namespaces NAMESPACE  ...READ MORE

answered Apr 2, 2019 in Kubernetes by TechnologyExist
• 160 points
4,328 views
0 votes
2 answers

Using a local image to create a pod in K8s

I'm not sure but you can try ...READ MORE

answered Apr 29, 2019 in Kubernetes by Vishaka
13,929 views
0 votes
1 answer

Pods IP address from inside a container in the pod

Make sure that your pod yaml file ...READ MORE

answered Aug 29, 2018 in Kubernetes by Kalgi
• 51,890 points
525 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
7,660 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 11, 2019 in Kubernetes by Kalgi
• 51,890 points

reshown Apr 12, 2019 by Kalgi 2,257 views
0 votes
1 answer

Pod stays in waiting in kubernetes cluster

If a Pod is stuck in the Waiting state, ...READ MORE

answered Oct 26, 2018 in Kubernetes by Kalgi
• 51,890 points
161 views
+2 votes
2 answers

Kubernetes Pods in Pending State

Hey @Shyam, you get this error because ...READ MORE

answered Oct 31, 2018 in Kubernetes by Kalgi
• 51,890 points
2,950 views