CNI-Genie icon indicating copy to clipboard operation
CNI-Genie copied to clipboard

Can not delete pod when create pod failed

Open JornShen opened this issue 3 years ago • 0 comments

In my cluster, I dont install wave. But pod can not run

# kubectl get pod 
NAME    READY   STATUS              RESTARTS   AGE
test5   0/1     ContainerCreating   0          2s

And pod.yaml is

apiVersion: v1
kind: Pod
metadata:
  name: test5
spec:
  containers:
  - name: agnhost
    image: hub.c.163.com/zrc2015/iperf:latest
# kubectl describe pod test5
XXXXX
Events:
  Type     Reason                  Age               From               Message
  ----     ------                  ----              ----               -------
  Normal   Scheduled               63s               default-scheduler  Successfully assigned default/test5 to kwephisprb14131
  Warning  FailedCreatePodSandBox  63s               kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container "16941c4624ec719ddbe8bfe91dc5cc83251f87a6edb3b6aef51ef8421ce088e4" network for pod "test5": networkPlugin cni failed to set up pod "test5_default" network: CNI Genie Add IP internal error: CNI Genie error at ParsePodAnnotations: Corresponding binary for user requested plugin (weave) is not present in plugin directory (/opt/cni/bin), result: %!!(MISSING)s(<nil>), failed to clean up sandbox container "16941c4624ec719ddbe8bfe91dc5cc83251f87a6edb3b6aef51ef8421ce088e4" network for pod "test5": networkPlugin cni failed to teardown pod "test5_default" network: CNI Genie release IP internal error: CNI Genie error at ParsePodAnnotations: Corresponding binary for user requested plugin (weave) is not present in plugin directory (/opt/cni/bin)]
  Normal   SandboxChanged          9s (x5 over 62s)  kubelet            Pod sandbox changed, it will be killed and re-created.

If I dont install wave, it will not create pod ? My node cni config have flannel and cilium

/etc/cni/net.d# ll
total 24
drwxr-xr-x 2 root root 4096 Mar  2 11:39 ./
drwxr-xr-x 3 root root 4096 Feb  2 15:47 ../
-rw-r--r-- 1 root root 1389 Mar  2 10:30 00-genie.conf
-rw-r--r-- 1 root root   97 Mar  2 11:39 05-cilium.conf
-rw-r--r-- 1 root root  292 Mar  2 10:21 10-flannel.conflist
-rw-r--r-- 1 root root  271 Mar  2 10:30 genie-kubeconfig

Is it reasonable since it have cni plugin ?

And I delete it, it block. pod always stay at Terminating status.

# kubectl describe pod test5
XXX
Events:
  Type     Reason                  Age                   From               Message
  ----     ------                  ----                  ----               -------
  Normal   Scheduled               5m17s                 default-scheduler  Successfully assigned default/test5 to kwephisprb14131
  Warning  FailedCreatePodSandBox  5m17s                 kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container "16941c4624ec719ddbe8bfe91dc5cc83251f87a6edb3b6aef51ef8421ce088e4" network for pod "test5": networkPlugin cni failed to set up pod "test5_default" network: CNI Genie Add IP internal error: CNI Genie error at ParsePodAnnotations: Corresponding binary for user requested plugin (weave) is not present in plugin directory (/opt/cni/bin), result: %!!(MISSING)s(<nil>), failed to clean up sandbox container "16941c4624ec719ddbe8bfe91dc5cc83251f87a6edb3b6aef51ef8421ce088e4" network for pod "test5": networkPlugin cni failed to teardown pod "test5_default" network: CNI Genie release IP internal error: CNI Genie error at ParsePodAnnotations: Corresponding binary for user requested plugin (weave) is not present in plugin directory (/opt/cni/bin)]
  Normal   SandboxChanged          40s (x23 over 5m16s)  kubelet            Pod sandbox changed, it will be killed and re-created.

I must use --force to delete it ?

JornShen avatar Mar 03 '21 03:03 JornShen