Modify internalip of node in kubernetes

8/31/2018

I think I just need to modify the internal ip of a worker node to get it back because its static Ip had changed.

I tried without success:

kubectl patch node mynode -p '{"status": {"addresses": [{ "address": "44.33.22.11", "type": "InternalIP" }] } }'

node "mynode" not patched

What is the way to modify the worker internalip from master node and get it back ?

Thank you in advance for your help.

-- Alphapage
flannel
kubernetes

1 Answer

9/3/2018

I found out the below way to update worker node IP address:

  1. Execute kubeadm reset on worker node.
  2. Change IP address using ifconfig <network interface> <IP address> command.
  3. Add node again using kubeadm join command.

Note, if you added custom IP addresses for worker Nodes to /etc/hosts, don’t forget to change it there.

-- Akar
Source: StackOverflow