Hello,
I had to destroy a Kubernetes cluster and recreate it, because it was in a completely broken state.
The cluster was associated with a DigitalOcean load balancer. I would rather not create a new load balancer with a different IP address, because I already have DNS records pointing to the existing load balancer. Is it possible to modify the existing load balancer to point to the new Kubernetes cluster? I could not find a way to do this in documentation.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there,
Looking at a LB service you should see they are provisioned with the loadbalancer id annotation.
To reuse a current already provisioned LB. You can use that annotation on the service that you want to take over the LB:
kubernetes.digitalocean.com/load-balancer-id: xxxxxx-blah-UUID-here-xxx
Please note that you should not have a LB being managed by two clusters as they will overwrite each others configurations.
Hope this helps!
Hi, what’s the structure (i.e. architecture) of your Kubernetes resources? Are you using a LoadBalancer in regards to your service resource definition? If this is the case, then you should never hard code an IP address here. Next, If you have created a DNS record that has an associated IP address, then I would create a Kubernetes Ingress resource using either Nginx or Traefik that sets the domain and not the IP.
e.g.
Note: The above is using Traefik apiVersion.
Well, I wish that the above information helps you and happy hacking.
–
Think different and code well,
-Conrad