Kubernetes Pods in Pending State

+2 votes

I just followed everything as mentioned in the below link

https://www.edureka.co/blog/install-kubernetes-on-ubuntu

Not sure what went wrong my nodes are in pending state only.

NAMESPACE     NAME                                       READY   STATUS     RESTARTS   AGE   IP              NODE      NOMINATED NODE
kube-system   calico-kube-controllers-6b48bc8d68-7mj7r   0/1     Pending    0          70m   <none>          <none>    <none>
kube-system   coredns-576cbf47c7-6tjh5                   0/1     Pending    0          70m   <none>          <none>    <none>
kube-system   coredns-576cbf47c7-9khk2                   0/1     Pending    0          70m   <none>          <none>    <none>
kube-system   etcd-kmaster                               0/1     Pending    0          1s    <none>          kmaster   <none>
kube-system   kube-apiserver-kmaster                     0/1     Pending    0          1s    <none>          kmaster   <none>
kube-system   kube-controller-manager-kmaster            0/1     Pending    0          1s    <none>          kmaster   <none>
kube-system   kube-proxy-qgw78                           1/1     NodeLost   1          75m   172.19.19.176   kmaster   <none>
kube-system   kube-scheduler-kmaster                     0/1     Pending    0          1s    <none>          kmaster   <none>
kube-system   kubernetes-dashboard-77fd78f978-zd5xq      0/1     Pending    0          67m   <none>          <none>    <none>

I have given enough resources as well

Conditions:
  Type             Status  LastHeartbeatTime                 LastTransitionTime                Reason                       Message
  ----             ------  -----------------                 ------------------                ------                       -------
  OutOfDisk        False   Tue, 30 Oct 2018 17:32:35 +0530   Tue, 30 Oct 2018 16:22:09 +0530   KubeletHasSufficientDisk     kubelet has sufficient disk space available
  MemoryPressure   False   Tue, 30 Oct 2018 17:32:35 +0530   Tue, 30 Oct 2018 16:22:09 +0530   KubeletHasSufficientMemory   kubelet has sufficient memory available
  DiskPressure     False   Tue, 30 Oct 2018 17:32:35 +0530   Tue, 30 Oct 2018 16:22:09 +0530   KubeletHasNoDiskPressure     kubelet has no disk pressure
  PIDPressure      False   Tue, 30 Oct 2018 17:32:35 +0530   Tue, 30 Oct 2018 16:22:09 +0530   KubeletHasSufficientPID      kubelet has sufficient PID available
  Ready            False   Tue, 30 Oct 2018 17:32:35 +0530   Tue, 30 Oct 2018 16:22:09 +0530   KubeletNotReady              runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized


Regards,

Shyam

Oct 30, 2018 in Kubernetes by Shyam
• 180 points

recategorized Oct 30, 2018 by Vardhan 7,151 views
Heyy @Shyam, have your nodes joined the cluster?
Hi ,

I am also facing the same issue.

NAMESPACE     NAME                                       READY   STATUS    RESTARTS   AGE   IP               NODE      NOMINATED NODE   READINESS GATES
kube-system   calico-kube-controllers-694687c474-6lqzq   0/1     Pending   0          17m   <none>           <none>    <none>           <none>
kube-system   coredns-86c58d9df4-9ffb8                   0/1     Pending   0          28m   <none>           <none>    <none>           <none>
kube-system   coredns-86c58d9df4-h7v4l                   0/1     Pending   0          23m   <none>           <none>    <none>           <none>
kube-system   etcd-kmaster                               1/1     Running   0          27m   10.223.126.202   kmaster   <none>           <none>
kube-system   kube-apiserver-kmaster                     1/1     Running   0          27m   10.223.126.202   kmaster   <none>           <none>
kube-system   kube-controller-manager-kmaster            1/1     Running   0          28m   10.223.126.202   kmaster   <none>           <none>
kube-system   kube-proxy-qmxdz                           1/1     Running   0          28m   10.223.126.202   kmaster   <none>           <none>
kube-system   kube-scheduler-kmaster                     1/1     Running   0          28m   10.223.126.202   kmaster   <none>           <none>
 

Please share if any one has a resolution.

Hey @Ravikiran, Check if you've given enough resources. Also describe those pending pods and show me the output. 

Use the following command for describing the pods:

 kubectl describe pod <pod-name>

2 answers to this question.

0 votes

No not yet. I am in the process of making the master node up and running, and, then will add the node to that.

Level up your Kubernetes expertise with our industry-leading Kubernetes Course.

answered Oct 31, 2018 by Shyam
• 180 points
Which network plugin are you using?

As per the document I am using Calico Network plugin. 

https://www.edureka.co/blog/install-kubernetes-on-ubuntu

+2 votes

Hey @Shyam, you get this error because no CNI network has been defined in /etc/cni/net.d and you're apparently using the CNI network plugin. If you're following the blog then calico is used there and make sure you've executed the following command:

$ kubectl apply -f https://docs.projectcalico.org/v3.0/getting-started/kubernetes/installation/hosted/kubeadm/1.7/calico.yaml
answered Oct 31, 2018 by Kalgi
• 52,360 points

So @Shyam, are you trying to access the dashboard from outside the cluster(but same IP address) or using a different IP address?

http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

I am using the above command but just replacing the localhost with the ip of that server.

Do I need to add one public IP for that then access ?

The dashboard is working when i access it from the console of the master VM. But I dont want to use like that.
Unfortunately, you can only access it only from within the node if you're using a VM.

Maybe if you've hosted it in the Cloud , then you can use the IP and port number.
Thanks @shyam

I had the same issue and your steps worked for me also...

Related Questions In Kubernetes

0 votes
1 answer
0 votes
5 answers

Kubernets cluster pod stays in pending state

I had the same issue. I spent ...READ MORE

answered May 3, 2019 in Kubernetes by Kashish
20,930 views
0 votes
1 answer
+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 12, 2019 in Kubernetes by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi 6,935 views
+1 vote
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
15,315 views
0 votes
2 answers

Restart pods when configmap updates in Kubernetes?

Use Deployments, and consider your ConfigMaps to ...READ MORE

answered Aug 31, 2018 in Kubernetes by Nilesh
• 7,060 points
7,546 views
0 votes
1 answer

Create kubernetes that manages pods in java

Fabric8's Kubernetes Client is using a generated ...READ MORE

answered Sep 5, 2018 in Kubernetes by Kalgi
• 52,360 points
556 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP