title: NetworkPlugin cni failed to set up pod "xxxxx" network: failed to set bridge addr: "cni0" already has an IP address different from10.x.x.x - Error
body: <p>I get this error after I start the worker node VMs(<code>Kubernetes</code>) from the <code>AWS</code> console. I am using <code>PKS</code> ( <code>Pivotal Container Service</code>)</p>
  
  <blockquote>
    <p>network for pod "xxxxx": NetworkPlugin cni failed to set up pod "xxxxx" network: failed to set bridge addr: "cni0" already has an IP address different from 10.x.x.x/xx</p>
  </blockquote>
  
  <p>I supppose that <code>Flannel</code> assigns a subnet lease to the workers in the cluster, which expires after 24 hours - and <code>flannel.1</code> and <code>cni0 /24</code> subnet no longer match, which causes this issue. </p>
  
  <p>I also know a workaround: </p>
  
  <pre><code>bosh ssh -d worker -c "sudo /var/vcap/bosh/bin/monit stop flanneld" 
  bosh ssh -d worker -c "sudo rm /var/vcap/store/docker/docker/network/files/local-kv.db" 
  bosh ssh -d worker -c "sudo /var/vcap/bosh/bin/monit restart all"
  </code></pre>
  
  <p>However is there any permanent fix to this?</p>