0

我已经建立了一个裸机 K8 集群,并且正在使用 weavenet CNI。我正在尝试部署 nginx,但 pod 卡在containercreating status 中。当我检查日志时,我发现它正在寻找法兰绒 CNI。我没有使用法兰绒!我正在使用 weavenet CNI 并且不确定如何解决这个问题

  Warning  FailedCreatePodSandBox  109s (x21 over 5m25s)   kubelet, ud-gbox-pro  (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "74504337fc88c44addf1b807ddb987fa54bbe02a7574b14ebcf5bdbb1422faaf" network for pod "nginx-deployment-cc7df4f8f-5mtks": networkPlugin cni failed to set up pod "nginx-deployment-cc7df4f8f-5mtks_default" network: open /run/flannel/subnet.env: no such file or directory

Kubectl 输出

 kubectl get pods --all-namespaces -o wide
    NAMESPACE        NAME                                     READY   STATUS              RESTARTS   AGE     IP                NODE             NOMINATED NODE   READINESS GATES
    default          nginx-deployment-cc7df4f8f-5mtks         0/1     ContainerCreating   0          9m56s   <none>            ud-gbox-pro      <none>           <none>
    default          nginx-deployment-cc7df4f8f-tpzdj         1/1     Running             0          9m56s   10.32.0.6         nuc-masternode   <none>           <none>
    kube-system      coredns-66bff467f8-8cf5x                 1/1     Running             0          34m     10.32.0.4         nuc-masternode   <none>           <none>
    kube-system      coredns-66bff467f8-zw8gs                 1/1     Running             0          34m     10.32.0.3         nuc-masternode   <none>           <none>
    kube-system      etcd-nuc-masternode                      1/1     Running             0          34m     192.168.178.200   nuc-masternode   <none>           <none>
    kube-system      kube-apiserver-nuc-masternode            1/1     Running             0          34m     192.168.178.200   nuc-masternode   <none>           <none>
    kube-system      kube-controller-manager-nuc-masternode   1/1     Running             0          34m     192.168.178.200   nuc-masternode   <none>           <none>
    kube-system      kube-proxy-99jvf                         1/1     Running             0          32m     192.168.178.127   ud-gbox-pro      <none>           <none>
    kube-system      kube-proxy-nfscr                         1/1     Running             0          34m     192.168.178.200   nuc-masternode   <none>           <none>
    kube-system      kube-scheduler-nuc-masternode            1/1     Running             0          34m     192.168.178.200   nuc-masternode   <none>           <none>
    kube-system      weave-net-bpxkl                          2/2     Running             0          33m     192.168.178.200   nuc-masternode   <none>           <none>
    kube-system      weave-net-f6lwq                          2/2     Running             0          32m     192.168.178.127   ud-gbox-pro      <none>           <none>
    metallb-system   controller-5854d49f77-qt9cr              1/1     Running             0          31m     10.32.0.5         nuc-masternode   <none>           <none>
    metallb-system   speaker-8jhsb                            1/1     Running             0          31m     192.168.178.200   nuc-masternode   <none>           <none>

Kubcetl 获取节点输出

 kubectl get nodes -o wide
NAME             STATUS   ROLES    AGE   VERSION   INTERNAL-IP       EXTERNAL-IP   OS-IMAGE        KERNEL-VERSION     CONTAINER-RUNTIME
nuc-masternode   Ready    master   34m   v1.18.3   192.168.178.200   <none>        Ubuntu 20.10    5.8.0-26-generic   docker://19.3.9
ud-gbox-pro      Ready    <none>   32m   v1.19.3   192.168.178.127   <none>        Linux Mint 20   5.4.0-52-generic   docker://19.3.13
4

0 回答 0