Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container “

报错信息

Warning FailedCreatePodSandBox 28m kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container "899b2a80f185eadd9ea231a8991ce5e9d92076cab46917b1e5653f333561df03" network for pod "nginx-demo": networkPlugin cni failed to set up pod "nginx-demo_default" network: error getting ClusterInformation: connection is unauthorized: Unauthorized, failed to clean up sandbox container "899b2a80f185eadd9ea231a8991ce5e9d92076cab46917b1e5653f333561df03" network for pod "nginx-demo": networkPlugin cni failed to teardown pod "nginx-demo_default" network: error getting ClusterInformation: connection is unauthorized: Unauthorized]

 

 

解决方案

vim calico.yaml        #编辑calico.yaml配置文件加入如下内容      可以搜索autudete
            - name: IP_AUTODETECTION_METHOD
              value: "interface=ens33"    #eth0是本地网卡名称 centos6下一般使用eth开头命名网卡,centos7下一般使用ens开头命名
 
kubectl apply -f calico.yaml    #更新

 

posted @ 2024-08-21 00:00  r1-12king  阅读(369)  评论(0编辑  收藏  举报