0
点赞
收藏
分享

微信扫一扫

coredns异常问题

Silence潇湘夜雨 2022-03-11 阅读 110

问题描述: 

Warning FailedCreatePodSandBox 89s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container "1c97ad2710e2939c0591477f9d6dde8e0d7d31b3fbc138a7fa38aaa657566a9a" network for pod "coredns-7f89b7bc75-qg924": networkPlugin cni failed to set up pod "coredns-7f89b7bc75-qg924_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 "1c97ad2710e2939c0591477f9d6dde8e0d7d31b3fbc138a7fa38aaa657566a9a" network for pod "coredns-7f89b7bc75-qg924": networkPlugin cni failed to teardown pod "coredns-7f89b7bc75-qg924_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")]

 

coredns-7f89b7bc75-jzs26          0/1     ContainerCreating   0          63s
coredns-7f89b7bc75-qg924          0/1     ContainerCreating   0          63s

1.calico网络导致coredns异常:

  • 更改calico.yaml
  • # Cluster type to identify the deployment type
      - name: CLUSTER_TYPE
      value: "k8s,bgp"
    # 下方新增
      - name: IP_AUTODETECTION_METHOD
        value: "interface=ens192"
        # ens192为本地网卡名字

    kubectl apply -f calico.yaml

  • [root@linux03 ~]# kubectl get pods -n kube-system
    NAME                                       READY   STATUS    RESTARTS   AGE
    calico-kube-controllers-69496d8b75-2nm5k   1/1     Running   0          23m
    calico-node-8wfk9                          1/1     Running   0          23m
    calico-node-9vn4v                          1/1     Running   0          23m
    calico-node-qm8s2                          1/1     Running   0          23m
    coredns-7f89b7bc75-jzs26                   1/1     Running   0          26m
    coredns-7f89b7bc75-qg924                   1/1     Running   0          26m
    etcd-linux03                               1/1     Running   0          26m
    kube-apiserver-linux03                     1/1     Running   0          26m
    kube-controller-manager-linux03            1/1     Running   0          26m
    kube-proxy-29lcf                           1/1     Running   0          25m
    kube-proxy-c29wz                           1/1     Running   0          26m
    kube-proxy-lpgrr                           1/1     Running   0          25m
    kube-scheduler-linux03                     1/1     Running   0          26m

2.flannel网络导致coredns异常:

k8s中coredns启动失败_汐银的博客-CSDN博客_coredns起不来

按照上面方法coredns删除后提示pending状态;

最后master重启一下就好了

 

举报

相关推荐

0 条评论