Kubernetes - calico IP_AUTODETECTION_METHOD impossible to set

2/10/2021

I want to force the interface, setting the IP_AUTODETECTION_METHOD:

$ kubectl set env daemonset/calico-node -n calico-system IP_AUTODETECTION_METHOD=interface=ens192
  daemonset.apps/calico-node env updated

But nothing happens:

$ kubectl set env daemonset/calico-node -n calico-system --list | grep IP_AUTODETECTION_METHOD
  IP_AUTODETECTION_METHOD=first-found
-- Ivan
kubernetes
project-calico

1 Answer

2/28/2022

On my cluster, running this:

kubectl set env daemonset/calico-node -n kube-system IP_AUTODETECTION_METHOD=interface=vbmgt0

from the control node did the trick as expected.

Are you running kubectl from the proper node ?

-- FLBzh
Source: StackOverflow