-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error "error adding container to network "k8s-pod-network": Unauthorized". #7171
Labels
Comments
This error can also occur when time on nodes is synchronized. There is a suspicion that this happens when OS's maximum number of open files or filesystem-watchers is exceeded (f.ex. fs.inotify.max_user_instances). Environment:
CNI debug logs: |
i have the same issue about 24h later after install calico
I reinstall calico,it works again |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pods are in "ContainerCreating" state due to authorization problem.
When API server token/certificate get rotated, calico is trying to authenticate using current token, which is invalid as API server token was rotated. Due to this calico is failing to authenticate with API server which results in failing to add network to POD.
Expected Behavior
pods status should be "Running"
Current Behavior
pods report error:
(combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "5a8497c42b0e1b6aa52eb0f0a8dfd4477db0a615af8e86edf7a6a2cef0b4ce94": plugin type="multus" name="multus-cni-network" failed (add): [kube-system/metrics-server-7968cd6ff4-t6sh2:k8s-pod-network]: error adding container to network "k8s-pod-network": Unauthorized
Possible Solution
Calico-node pod should be somehow check weather API server tokens is rotated, if yes, calico should request token immediately .
Steps to Reproduce (for bugs)
Context
Your Environment
The text was updated successfully, but these errors were encountered: