-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to reconfigure the HA node when the associated internal IP is changed ? #4233
Comments
Kubernetes nodes are assumed to have a static IP address for the life of the node. If you want to change it's address, the best way to do so is to delete it and rejoin it to the cluster. |
Is there any other way apart from this? This might be easiest way but not be feasible all the time :) In one node cluster, restarting the k3s service will do the trick. |
If it's the only node restarting it will likely do the job, but in general Kubernetes doesn't deal well with nodes changing addresses. It certainly won't deal with it without being restarted at the very least. |
Thanks for your reply @brandond . Other option that came to my mind is to manually update the datastore entries to disallow stale reporting to kubernetes. I know you have given two options, but both are not feasible for our setup. If you have a different solution which is probably based out of a CRD or anything, please let me know. |
I don't think that's going to get you the result you want either. The issue is not just what's in the datastore, but also the caches, runtime state, iptables rules, etc of every other node in the cluster. Kubernetes is built around nodes having a stable IP address at LEAST while running and it's probably going to be an uphill battle to get it to function well without them. |
I understand. Thank you very much for your responses @brandond . |
Hi @brandond , I tried rebooting the machine this time and surprisingly it worked !! Thanks a lot for all the help !! |
Environmental Info:
K3s Version:
k3s -v
k3s version v1.21.3+k3s1 (1d1f220f)
go version go1.16.6
Node(s) CPU architecture, OS, and Version:
uname -a
Linux testmachine1 4.14.173 #24 SMP Wed Sep 8 12:34:51 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Cluster Configuration:
2 Node HA with Mariadb external datastore.
Describe the bug:
This is not a bug, rather a question on configuration.
In k3s HA environment with external data-store as mysql/mariadb, when the interface ip bound to API-server changes, does K3s updates this datastore or manual intervention is required ?
For example,
Node1: eth0:
192.168.0.100
eth1:
100.100.12.123
InternalIP of k3s node Node1:
192.168.0.100
Node2: eth0:
192.168.0.101
eth2:
100.100.12.124
InternalIP of k3s node Node2:
192.168.0.101
Now if Node2 eth0 ip changes to
192.168.0.106
, kubectl get nodes still shows the old ip.Is there any manual intervention required in case of external data-store like mysql/mariadb ?
Backporting
No
The text was updated successfully, but these errors were encountered: