failed to set bridge addr: “cni0“ already has an IP address different from xxxx
Recently, when debugging Kubernetes to add or delete a node, after which deploying Pod on this node, a community card address error exception occurred. The troubleshooting answer for this exception is as follows:
(mixed from comparable occasions): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup community for sandbox “745720ffb20646054a167560299b19bb9ae046fe6c677b5d26312b89a26554e1”: failed to set bridge addr: “cni0” already has an IP address different from 172.20.2.1/24
- Delete the node with out restarting the node server, restart the node server (on this case, it’s often brought on by the server cache, restart the server on it)
- After restarting the server or not, delete the improper NIC on the node and await the system to rebuild robotically, the operation course of is as follows.
sudo ifconfig cni0 down sudo ip hyperlink delete cni0