Reputation: 21
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
Upvotes: 2
Views: 4618
Reputation: 11
kubectl set env daemonset/calico-node -n kube-system IP_AUTODETECTION_METHOD=interface=ens192 # replace with your interface
Restart the calico pod after running this command and it should work fine as it will now use your desired interface.
Upvotes: 1
Reputation: 1
You have to change it via tigera-operator like this:
kind: Installation
apiVersion: operator.tigera.io/v1
metadata:
name: default
namespace: tigera-operator
spec:
calicoNetwork:
nodeAddressAutodetectionV4:
cidrs:
- "10.44.0.0/22"
At this example node interial Ips are at 10.44.0.0/22 CIDR.
Upvotes: 0
Reputation: 141
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 ?
Upvotes: 1