Use existing floating_ip assigned to server not working for ingress #857
Replies: 5 comments 1 reply
-
@sebastianlutter I wonder why you would need to start and stop a cluster. And by that you mean recreating correct? Normally that shouldn't be needed. Instead of a floating IP you may want to put a manual Hetzner LB in front of your cluster(s) LBs, so that they serve traffic to the cluster that is not down if that's what you need. Also have a look at ExternalDNS, if your cluster is really just stopped, then that is the way to go, it will update the DNS immediately if the ingress controller deployed LB IP changes. Just ideas, I do not know what else you could do. @kube-hetzner/core Any more ideas? |
Beta Was this translation helpful? Give feedback.
-
@sebastianlutter More info on servicelb and why you cannot really configure it. k3s-io/k3s#3032 (comment) |
Beta Was this translation helpful? Give feedback.
-
@mysticaltech Ok, ServiceLB simply is not made for this. Thanks! To fully recreate the cluster is part of the project I do, and that is not common (I know). If I could assign the floating IP to a LoadBalancer everything would be easy, but that is not possible with hetzner cloud yet. I'll test to set a HetznerLB in front of my cluster. Another way would be if the As far as I can understand the code the current agent node
Then with the following changes the use of an existing floating_ip should be possible:
But does this sounds sane? Possible? |
Beta Was this translation helpful? Give feedback.
-
@sebastianlutter params floating_ip=true create new floating_ip. It's bad options, because you need also connect it to DNS name My solution - I delete all agent and save control-plane (so I pay only for control-plane control-plane) |
Beta Was this translation helpful? Give feedback.
-
Did not find the free time to work on this atm, hope this will change in the next weeks. My current workaround is like this: In
But the problem is that this will stuck the installation if the floating ip is not assigned to the node (which is not the case since terraform does not assign it). To workaround this I wrote this script:
Before calling
It polls in background until the node has been started by terraform and assigns the IP then. Its just a dirty hack, but maybe it helps somebody |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have an existing floating IP (DNS points to this IP) and try to use it with a kube-hetzner cluster. I start the cluster with the config below, then assign the floating_ip to the worker node (using hcloud or UI) and then create an Ingress to a nginx dummy pod running on the worker with some domain
foo.bar.org
. Lets say the node has IP A and there is the floating IP.The ServiceLB (klipper) only lists the node IPs as external IPs, the floating IP is not there. I guess this is why the ingress-nginx cannot be reached, it is bound to the nodes first IP, not the second floating IP I assigned. I found no way to tell klipper to add my floating_ip to the list. Documentation is very limited, and I guess it all depends on k3s options. With
metalLB
I could configure the single floating IP as available IP pool and it should work, how to do this with ServiceLB?I found the
floating_ip
attribute of agent_nodes, and read the discussion about it: #611As far as I understood giving an agent_node a
floating_ip = true
creates a hetzner floating IP and assigns it to the node. There is currently no way to specify to use an existing floating IP, right? But this is what I would need (Define to use an existing floating_ip, assign it to the node, configure eth0, inform ServiceLB to add it as external IP).Goal is to have a floating IP I keep, and be able to use the IP with Ingress rules. We often start and stop test cluster, and have domains pointing to the floating_ip to make them quickly available to customers (without DNS cache/sync problems because of changing IPs every restart.
How would you do deal with this in general?
Thanks,
Sebastian
My kube.tf
Beta Was this translation helpful? Give feedback.
All reactions