After installing kubernetes cluster on VM (for education purpose) I have noticed that for some reason it is using wrong network interface for InternalIP (search in the following output: InternalIP: 10.0.2.15)
master@kmaster:~$ kubectl describe nodes
Name: kmaster
Roles: master
Labels: beta.kubernetes.io/arch=amd64
beta.kubernetes.io/os=linux
kubernetes.io/arch=amd64
kubernetes.io/hostname=kmaster
kubernetes.io/os=linux
node-role.kubernetes.io/master=
Annotations: kubeadm.alpha.kubernetes.io/cri-socket: /var/run/dockershim.sock
node.alpha.kubernetes.io/ttl: 0
volumes.kubernetes.io/controller-managed-attach-detach: true
CreationTimestamp: Thu, 20 Jun 2019 12:02:55 +0200
Taints: node-role.kubernetes.io/master:NoSchedule
node.kubernetes.io/unreachable:NoSchedule
Unschedulable: false
Conditions:
Type Status LastHeartbeatTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ------ -------
MemoryPressure Unknown Fri, 21 Jun 2019 16:11:23 +0200 Fri, 21 Jun 2019 16:12:27 +0200 NodeStatusUnknown Kubelet stopped posting node status.
DiskPressure Unknown Fri, 21 Jun 2019 16:11:23 +0200 Fri, 21 Jun 2019 16:12:27 +0200 NodeStatusUnknown Kubelet stopped posting node status.
PIDPressure Unknown Fri, 21 Jun 2019 16:11:23 +0200 Fri, 21 Jun 2019 16:12:27 +0200 NodeStatusUnknown Kubelet stopped posting node status.
Ready Unknown Fri, 21 Jun 2019 16:11:23 +0200 Fri, 21 Jun 2019 16:12:27 +0200 NodeStatusUnknown Kubelet stopped posting node status.
Addresses:
InternalIP: 10.0.2.15
Hostname: kmaster
...
{there is way more output but I cut it here}
When I was installing network driver “Flannel” I explicitly indicated to use different NIC.
Surprisingly, I still see it in /etc/kubernetes/manifests/kube-apiserver.yaml
However In the output of kubectl describe nodes it is used different one.
Anyone knows how to change it?