<p>this is my deployment.yaml</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
        - name: nginx
          image: nginx:1.12.2
          ports:
            - containerPort: 80
</code></pre>
<hr />
<p>this is my pods</p>
<pre><code>NAME                                READY   STATUS              RESTARTS   AGE   IP       NODE        NOMINATED NODE   READINESS GATES
nginx-deployment-5cc6c7559b-6vk87   0/1     ContainerCreating   0          51m   &lt;none&gt;   k8s-node2   &lt;none&gt;           &lt;none&gt;
nginx-deployment-5cc6c7559b-g7wpz   0/1     ContainerCreating   0          51m   &lt;none&gt;   k8s-node1   &lt;none&gt;           &lt;none&gt;
nginx-deployment-5cc6c7559b-s6k2s   0/1     ContainerCreating   0          51m   &lt;none&gt;   k8s-node1   &lt;none&gt;           &lt;none&gt;
</code></pre>
<hr />
<p>this is my description of a pod</p>
<pre><code>Name:           nginx-deployment-5cc6c7559b-6vk87
Namespace:      default
Priority:       0
Node:           k8s-node2/192.168.74.136
Start Time:     Mon, 22 Mar 2021 03:02:36 -0400
Labels:         app=nginx
                pod-template-hash=5cc6c7559b
Annotations:    &lt;none&gt;
Status:         Pending
IP:
IPs:            &lt;none&gt;
Controlled By:  ReplicaSet/nginx-deployment-5cc6c7559b
Containers:
  nginx:
    Container ID:
    Image:          nginx:1.12.2
    Image ID:
    Port:           80/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Environment:    &lt;none&gt;
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-s7x98 (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True
Volumes:
  default-token-s7x98:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-s7x98
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  &lt;none&gt;
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason                  Age                     From                Message
  ----     ------                  ----                    ----                -------
  Normal   Scheduled               &lt;unknown&gt;               default-scheduler   Successfully assigned default/nginx-deployment-5cc6c7559b-6vk87 to k8s-node2
  Warning  FailedCreatePodSandBox  33m                     kubelet, k8s-node2  Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container &quot;688ae6e1b403f8cf0f56bb41ef6e2341044c949304874400a3f4ced159c40f08&quot; network for pod &quot;nginx-deployment-5cc6c7559b-6vk87&quot;: networkPlugin cni failed to set up pod &quot;nginx-deployment-5cc6c7559b-6vk87_default&quot; network: open /run/flannel/subnet.env: no such file or directory
  Warning  FailedCreatePodSandBox  33m                     kubelet, k8s-node2  Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container &quot;d8b9f498bf0407ebc5e8e47700af9cec559632f38d12252b1edcde723ce9863f&quot; network for pod &quot;nginx-deployment-5cc6c7559b-6vk87&quot;: networkPlugin cni failed to set up pod &quot;nginx-deployment-5cc6c7559b-6vk87_default&quot; network: open /run/flannel/subnet.env: no such file or directory
  Warning  FailedCreatePodSandBox  33m                     kubelet, k8s-node2  Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container &quot;2c72ed28e5672a1da32f7941ba0b638eb459048ff9e70aec42bd125a569faf3f&quot; network for pod &quot;nginx-deployment-5cc6c7559b-6vk87&quot;: networkPlugin cni failed to set up pod &quot;nginx-deployment-5cc6c7559b-6vk87_default&quot; network: open /run/flannel/subnet.env: no such file or directory
  Warning  FailedCreatePodSandBox  33m                     kubelet, k8s-node2  Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container &quot;7dd06af29506a6e4f22c9484b47ca23412a57b61398ee6caa89edec59e2dcfa5&quot; network for pod &quot;nginx-deployment-5cc6c7559b-6vk87&quot;: networkPlugin cni failed to set up pod &quot;nginx-deployment-5cc6c7559b-6vk87_default&quot; network: open /run/flannel/subnet.env: no such file or directory
  Warning  FailedCreatePodSandBox  33m                     kubelet, k8s-node2  Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container &quot;6c14c33fdbb3bb8e42d7e33c991bc51220dcbfd5acc71115c26f966a759fff29&quot; network for pod &quot;nginx-deployment-5cc6c7559b-6vk87&quot;: networkPlugin cni failed to set up pod &quot;nginx-deployment-5cc6c7559b-6vk87_default&quot; network: open /run/flannel/subnet.env: no such file or directory
  Warning  FailedCreatePodSandBox  33m                     kubelet, k8s-node2  Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container &quot;dacb90c7ab07cc55c83dba82286e65dd89e30be569e9b5744202c2ae65f54830&quot; network for pod &quot;nginx-deployment-5cc6c7559b-6vk87&quot;: networkPlugin cni failed to set up pod &quot;nginx-deployment-5cc6c7559b-6vk87_default&quot; network: open /run/flannel/subnet.env: no such file or directory
  Warning  FailedCreatePodSandBox  33m                     kubelet, k8s-node2  Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container &quot;d03004bff912d6f9aaf614e892d2b43c153392e8fcc03e7988c43d4dfb46ebf0&quot; network for pod &quot;nginx-deployment-5cc6c7559b-6vk87&quot;: networkPlugin cni failed to set up pod &quot;nginx-deployment-5cc6c7559b-6vk87_default&quot; network: open /run/flannel/subnet.env: no such file or directory
  Warning  FailedCreatePodSandBox  33m                     kubelet, k8s-node2  Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container &quot;7eaf53ffba761c30bfa13f2b3cae2ca2957f9fefee47edf6c0b46943bb09d7a3&quot; network for pod &quot;nginx-deployment-5cc6c7559b-6vk87&quot;: networkPlugin cni failed to set up pod &quot;nginx-deployment-5cc6c7559b-6vk87_default&quot; network: open /run/flannel/subnet.env: no such file or directory
  Warning  FailedCreatePodSandBox  33m                     kubelet, k8s-node2  Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container &quot;5047e9ad878b99b69090cf96e5534dfe10ec46830cdcc7e73a8afc96dc11e98c&quot; network for pod &quot;nginx-deployment-5cc6c7559b-6vk87&quot;: networkPlugin cni failed to set up pod &quot;nginx-deployment-5cc6c7559b-6vk87_default&quot; network: open /run/flannel/subnet.env: no such file or directory
  Normal   SandboxChanged          18m (x859 over 33m)     kubelet, k8s-node2  Pod sandbox changed, it will be killed and re-created.
  Warning  FailedCreatePodSandBox  3m34s (x1712 over 33m)  kubelet, k8s-node2  (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container &quot;501ff9b578eac098d6f763a0bc6212423b71714c9d2b1c83ea94b25e7a30e374&quot; network for pod &quot;nginx-deployment-5cc6c7559b-6vk87&quot;: networkPlugin cni failed to set up pod &quot;nginx-deployment-5cc6c7559b-6vk87_default&quot; network: open /run/flannel/subnet.env: no such file or directory
</code></pre>
<p>I find a similar question:<a href="https://stackoverflow.com/questions/51169728/failed-create-pod-sandbox-rpc-error-code-unknown-desc-networkplugin-cni-fa">Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod network</a></p>
<p>I have /etc/cni/net.d and its /opt/cni/bin\</p>
<pre><code>[root@k8s-master bin]# cd /etc/cni/net.d/
[root@k8s-master net.d]# ll -a
total 4
drwxr-xr-x. 2 root root  33 Feb 25 11:08 .
drwxr-xr-x. 3 root root  19 Feb 25 11:08 ..
-rw-r--r--. 1 root root 292 Feb 25 11:08 10-flannel.conflist
[root@k8s-master net.d]# cd /opt/cni/bin
[root@k8s-master bin]# ll -a
total 56484
drwxr-xr-x. 2 root root     239 Feb 25 10:01 .
drwxr-xr-x. 3 root root      17 Feb 25 10:01 ..
-rwxr-xr-x. 1 root root 3254624 Sep  9  2020 bandwidth
-rwxr-xr-x. 1 root root 3581192 Sep  9  2020 bridge
-rwxr-xr-x. 1 root root 9837552 Sep  9  2020 dhcp
-rwxr-xr-x. 1 root root 4699824 Sep  9  2020 firewall
-rwxr-xr-x. 1 root root 2650368 Sep  9  2020 flannel
-rwxr-xr-x. 1 root root 3274160 Sep  9  2020 host-device
-rwxr-xr-x. 1 root root 2847152 Sep  9  2020 host-local
-rwxr-xr-x. 1 root root 3377272 Sep  9  2020 ipvlan
-rwxr-xr-x. 1 root root 2715600 Sep  9  2020 loopback
-rwxr-xr-x. 1 root root 3440168 Sep  9  2020 macvlan
-rwxr-xr-x. 1 root root 3048528 Sep  9  2020 portmap
-rwxr-xr-x. 1 root root 3528800 Sep  9  2020 ptp
-rwxr-xr-x. 1 root root 2849328 Sep  9  2020 sbr
-rwxr-xr-x. 1 root root 2503512 Sep  9  2020 static
-rwxr-xr-x. 1 root root 2820128 Sep  9  2020 tuning
-rwxr-xr-x. 1 root root 3377120 Sep  9  2020 vlan
</code></pre>
<p>I have three nodes named k8s-master k8s-node1 and k8s-node2,but I don't add rules for nodes.</p>
<p>Something is not right</p>
<pre><code>NAME                                 READY   STATUS             RESTARTS   AGE
coredns-7ff77c879f-m7bjr             0/1     CrashLoopBackOff   171        24d
coredns-7ff77c879f-x4xjf             0/1     Running            170        24d
etcd-k8s-master                      1/1     Running            0          24d
kube-apiserver-k8s-master            1/1     Running            8          24d
kube-controller-manager-k8s-master   1/1     Running            2          24d
kube-proxy-6wxcp                     1/1     Running            1          24d
kube-proxy-cmhn6                     1/1     Running            0          24d
kube-proxy-pzhqc                     1/1     Running            0          24d
kube-scheduler-k8s-master            1/1     Running            2          24d
</code></pre>
<p>my network plugin flannel isn't work,maybe it cause this question</p>

<p>Only execute one command</p>
<pre><code>kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
</code></pre>
<p>Question is over</p>
