When creating/adding a node to kubernetes, we also have to create a Canal pod.
Currently, kubernetes does not wait for the Canal pod to be ready before trying to schedule pods, resulting in failures (error below)
Error syncing pod, skipping: failed to "CreatePodSandbox" for "nginx-2883150634-fh5s2_default(385d61d6-6662-11e7-8989-000d3af349de)" with CreatePodSandboxError: "CreatePodSandbox for pod \"nginx-2883150634-fh5s2_default(385d61d6-6662-11e7-8989-000d3af349de)\" failed: rpc error: code = 2 desc = NetworkPlugin cni failed to set up pod \"nginx-2883150634-fh5s2_default\" network: failed to find plugin \"loopback\" in path [/opt/loopback/bin /opt/cni/bin]"
Once the Canal pod is up-and-running, simply deleting the failing pod(s) will fix the issue.
My question is: what would be the right way to tell kubernetes to wait for the network pod to be ready before trying to schedule pods on the node?
- Should I taint the node to only allow Canal, and untaint once it is ready?
- Should I script the deleting of failed pods once Canal is ready?
- Is there a configuration or a way to do it that eliminate the issue?
kubectl
commands or at least the workflow and why you need to do that workflow? Isn't Canal something that is deployed to all clusters before deploying other Pods? – Andy Shinn