Skip to main content

Coredns in pending state in Kubernetes cluster

 in order to add nodes to K8S cluster you must deploy a Container Network Interface (CNI) 

NAMESPACE     NAME                            READY   STATUS    RESTARTS   AGE

kube-system   coredns-64897985d-4npkg          0/1     Pending   0          5h33m
kube-system   coredns-64897985d-qm8gt          0/1     Pending   0          5h33m
kube-system   etcd-KubeMngr                    1/1     Running   1          5h33m
kube-system   kube-apiserver-KubeMngr          1/1     Running   1          5h33m
kube-system   kube-controller-manager-KubeMngr 1/1     Running   1          5h33m
kube-system   kube-proxy-w6mmf                 1/1     Running   0          5h33m
kube-system   kube-scheduler-KubeMngr          1/1     Running   1          5h33m

here is an example of how to install calico CNI:

download YAML file:

curl https://docs.projectcalico.org/manifests/calico.yaml -O


apply it using kubectl cli:

kubectl apply -f calico.yaml


and:
[root@KubeMngr kubernetes]# kubectl get pods --all-namespaces
NAMESPACE     NAME                                READY   STATUS    RESTARTS   AGE
kube-system   calico-kube-controllers-647d84984b   1/1     Running   0   110s
kube-system   calico-node-zn98r                    1/1     Running   0         112s
kube-system   coredns-64897985d-4npkg              1/1     Running   0         5h38m
kube-system   coredns-64897985d-qm8gt              1/1     Running   0         5h38m
kube-system   etcd-KubeMngr                        1/1     Running   1         5h38m
kube-system   kube-apiserver-KubeMngr              1/1     Running   1         5h38m
kube-system   kube-controller-manager-KubeMngr     1/1     Running   1       5h38m
kube-system   kube-proxy-w6mmf                     1/1     Running   0         5h38m
kube-system   kube-scheduler-KubeMngr              1/1     Running   1         5h38m

Comments