我们通过rancher 2.6.3自定义方式部署的K8S集群,有时候在调度pod时会报错FailedCreatePodSandBox,具体报错:
Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container “4c6be0864c3b8ce1967ce0726d8f33645cb3af6cfd9a362f6c7702368df18ba9” network for pod “test-bond-deployment-5fb56698c8-dsvmr”: networkPlugin cni failed to set up pod “test-bond-deployment-5fb56698c8-dsvmr_lianxin-prd” network: error getting ClusterInformation: connection is unauthorized: Unauthorized, failed to clean up sandbox container “4c6be0864c3b8ce1967ce0726d8f33645cb3af6cfd9a362f6c7702368df18ba9” network for pod “test-bond-deployment-5fb56698c8-dsvmr”: networkPlugin cni failed to teardown pod “test-bond-deployment-5fb56698c8-dsvmr_lianxin-prd” network: error getting ClusterInformation: connection is unauthorized: Unauthorized]
然后我们尝试重启docker服务就恢复正常了,然后可能过段时间又出现这种问题。
k8s版本:v1.21.7
docker版本:20.10.14、19.3.14
操作系统版本:Ubuntu 20.04.5 LTS 、Ubuntu 18.04.6 LTS