I create a cluster k8s without internet.when i run kubeadm init --apiserver-advertise-address=... --pod-network-cidr=... everything's fine. But I run kubectl get pod -A. coredns pending. i tried using calico network but still get the same error
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-64897985d-rzpsj 0/1 Pending 0 6m31s
kube-system coredns-64897985d-wp9wg 0/1 Pending 0 6m31s
kube-system etcd-localhost.localdomain 1/1 Running 0 6m46s
kube-system kube-apiserver-localhost.localdomain 1/1 Running 0 6m46s
kube-system kube-controller-manager-localhost.localdomain 1/1 Running 0 6m46s
kube-system kube-proxy-kx96h 1/1 Running 0 6m31s
kube-system kube-scheduler-localhost.localdomain 1/1 Running 0 6m47s
When I describe pod coredns kubectl describe pod -n kube-system coredns-64897985d-rzpsj the messege:
1. 0/1 nodes are available: 1 node(s) had taint {node.kubernetes.io/not-ready: }, that the pod didn't tolerate.
2. Network is not ready: container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized MountVolume.
3. SetUp failed for volume "config-volume" : object "kube-system"/"coredns" not registered
I was untainted :
1. kubectl taint nodes --all node.kubernetes.io/not-ready:NoSchedulebut not working.
2. kubectl taint nodes --all node.kubernetes.io/not-ready-
But still not working.That is message when run : systemctl status kubelet
Mar 15 21:30:00 localhost.localdomain kubelet[21132]: E0315 21:30:00.051765 21132 pod_workers.go:951] "Error syncing pod, skipping" err="network is not ready: container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized" pod="kube-system/coredns-64897985d-wp9wg" podUID=6305836d-7d64-43e1-bcb5-cfdf44c34ea2
Mar 15 21:30:00 localhost.localdomain kubelet[21132]: E0315 21:30:00.482345 21132 kubelet.go:2386] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized"
Mar 15 21:30:02 localhost.localdomain kubelet[21132]: E0315 21:30:02.052122 21132 pod_workers.go:951] "Error syncing pod, skipping" err="network is not ready: container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized" pod="kube-system/coredns-64897985d-rzpsj" podUID=04758332-13ab-48a5-b808-43f741dbd9e0
This error only occurs when there is no internet connection. I create a VM machine connect internet and setup cluser, I don't get this error. How to make pod coredns running?.
What is the exact problem encountered?. Pleas help me