In my kubernetes cluster, each node is a virtualbox vm with two NICs, eth0 for NAT and eth1 for Host-Local communicating.
kubectl get pod --all-namespaces -o wide
shows
We can see k8s-3 and k8s-4 reports correct IPs while k8s-2 doesn't.
I've tried to add --bind-address=192.168.99.202
in k8s-2
's kube-proxy.yaml
but it just don't work.
Anyone has any advice?
https://github.com/kubernetes/kubernetes/issues/44702
Problem solved by passing --node-ip=
to kubelet.
use --hostname-override in your kubelet and set it to the ip. it will make your name of your node into your ip but it will have the correct address. i had this problem on my test cluster (vagrant and virtualbox) and i had to make that change. I also set the hostname-overide in my kube-proxy. i was troubleshooting issues with my kube-proxy and at one point i made that change but thats not what ultimately resolved it so i am unsure if really needed.
if your running flannel, don't forget to make sure its using the correct --iface since it likes to use eth0.