Skip to main content

Posts

Showing posts from December, 2021

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-

[kubelet-check] It seems like the kubelet isn't running or healthy.

  [ kubelet-check ] It seems like the kubelet isn't running or healthy. [ kubelet-check ] The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get http://localhost:10248/healthz: dial tcp 127.0.0.1:10248: connect: connection refused. Solution is very simple: SWAP must be disabled in K8S nodes simply run those command by root and restart the machine: sudo swapoff -a sudo sed -i '/ swap / s/^/#/' /etc/fstab