k3s agent on google cloud vm using the wrong ip #11981
Unanswered
fima-methodic
asked this question in
Q&A
Replies: 1 comment 1 reply
-
If you want to change the public IP, you should set See also the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a k8s cluster that was installed by k3s.
The k3s server is installed on an on-prem server, and there is also a k3s agent that is installed on an another on-prem server.
Both instances has
Addresses.InternalIP
andflannel.alpha.coreos.com/public-ip
pointing the external ip of each on-prem server and everything is working perfectly (the communication between the nodes and pods is working as expected).I've added another k3s agent on a google cloud vm, but in this case the the Addresses.InternalIP and flannel.alpha.coreos.com/public-ip are pointing to the internal ip of the google cloud vm instead of the external ip.
This is creating a problem - the agent is created and registered but there is no communication between the server + on prem node and the google cloud vm agent. (pods are not initialized and the metrics-server is unable to get any data from this node)
I have added the
--node-ip
flag which changed theAddresses.InternalIP
and it did solved part of the problem - pods are being created, the metrics server is reaching this node and receiving data. butflannel.alpha.coreos.com/public-ip
is still using google cloud's vm internal ip (through network interface) i have tried to override it with--flannel-conf
but it didn't worked.Is there a way to configure it to use only google cloud's vm external ip? Or it just not possible to use a google cloud's vm as a k3s-agent if the k3s-server is running on an on-prem server?
The k3s server and nodes:
k3s-version - v1.31.6+k3s1
OS - ubuntu 24.04
Beta Was this translation helpful? Give feedback.
All reactions