failed to teardown pod "coredns-7ff77c879f-hkj5z_kube-system : x509: certificate signed by unkn

 

 

Events:
  Type     Reason                  Age               From               Message
  ----     ------                  ----              ----               -------
  Normal   Scheduled               27s               default-scheduler  Successfully assigned kube-system/coredns-7ff77c879f-hkj5z to centos7
  Warning  FailedCreatePodSandBox  25s               kubelet, centos7   Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container "fdfc6a8f12bade06b73930dea5f7a3698ebcdabfea59fa1290fde19fbdb5891a" network for pod "coredns-7ff77c879f-hkj5z": networkPlugin cni failed to set up pod "coredns-7ff77c879f-hkj5z_kube-system" network: error getting ClusterInformation: Get "https://[10.96.0.1]:443/apis/crd.projectcalico.org/v1/clusterinformations/default": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes"), failed to clean up sandbox container "fdfc6a8f12bade06b73930dea5f7a3698ebcdabfea59fa1290fde19fbdb5891a" network for pod "coredns-7ff77c879f-hkj5z": networkPlugin cni failed to teardown pod "coredns-7ff77c879f-hkj5z_kube-system" network: error getting ClusterInformation: Get "https://[10.96.0.1]:443/apis/crd.projectcalico.org/v1/clusterinformations/default": x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")]
  Normal   SandboxChanged          9s (x2 over 25s)  kubelet, centos7   Pod sandbox changed, it will be killed and re-created.
[root@centos7 ~]# ls /etc/cni/
net.d
[root@centos7 ~]# ls /etc/cni/net.d/
10-calico.conflist  10-flannel.conflist  calico-kubeconfig
[root@centos7 ~]# rm -rf /etc/cni/net.d/10-calico.conflist 
[root@centos7 ~]# rm -rf /etc/cni/net.d/calico-kubeconfig 

 

mkdir -p $HOME/.kube
cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
chown $(id -u):$(id -g) $HOME/.kube/config
echo export KUBECONFIG=~/.kube/config>> ~/.bashrc
source ~/.bashrc

 

 

[root@centos7 ~]# kubectl get pods  --all-namespaces
NAMESPACE     NAME                              READY   STATUS    RESTARTS   AGE
kube-system   coredns-7ff77c879f-hkj5z          1/1     Running   0          97s
kube-system   coredns-7ff77c879f-w5v8q          1/1     Running   0          3m46s
kube-system   etcd-centos7                      1/1     Running   0          28m
kube-system   kube-apiserver-centos7            1/1     Running   0          28m
kube-system   kube-controller-manager-centos7   1/1     Running   0          28m
kube-system   kube-flannel-ds-arm64-gmljw       1/1     Running   0          7m31s
kube-system   kube-proxy-dv7lj                  1/1     Running   0          28m
kube-system   kube-scheduler-centos7            1/1     Running   0          28m

 

上一篇:《剑指Offer——对称的二叉树》代码


下一篇:X509证书详解(中文翻译)