k8s集群coredns启动异常
- 环境
ubuntu 20.4.3
- 报错内容
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 15s default-scheduler Successfully assigned kube-system/coredns-58c86fb885-2l6vh to db-storagea
Warning FailedCreatePodSandBox 14s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container "1bcad3baf705a2989a902e9d36536e161b4acacd4225ca3bcb52700e363869ea" network for pod "coredns-58c86fb885-2l6vh": networkPlugin cni failed to set up pod "coredns-58c86fb885-2l6vh_kube-system" network: error getting ClusterInformation: connection is unauthorized: Unauthorized, failed to clean up sandbox container "1bcad3baf705a2989a902e9d36536e161b4acacd4225ca3bcb52700e363869ea" network for pod "coredns-58c86fb885-2l6vh": networkPlugin cni failed to teardown pod "coredns-58c86fb885-2l6vh_kube-system" network: error getting ClusterInformation: connection is unauthorized: Unauthorized]
Normal SandboxChanged 13s kubelet Pod sandbox changed, it will be killed and re-created.
重启还是这样,找不到头绪,在此求助,希望有人知道咋回事。
回答
看下 vim /etc/resolv.conf里dns指向不要写自己的地址。改成114.114.114.114