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 1,936 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.
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
• 40,480 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
1 answer
0 votes
5 answers
0 votes
1 answer
+3 votes
1 answer
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 in Others by anonymous
2,190 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
• 6,880 points
3,283 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
• 40,480 points
31 views