By gd12358
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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: "foo"
namespace: production
spec:
rules:
- host: some.example.com
http:
paths:
- path: /
backend:
serviceName: some_service_1
servicePort: 80
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
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!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.