Hi.
I’m having issues with the Load Balancer in my Cluster/services.
I have created a certificate through the DO Control Panel (using Let’s Encrypt), used doctl compute certificate list
to get the ID and attached to the service.beta.kubernetes.io/do-loadbalancer-certificate-id
annotation from my Service.
It worked as it should. SSL responds correctly, but if I need to change the certificate from my LB, nothing happens. I put the ID from another certificate into the do-loadbalancer-certificate-id
annotation but after saving, the old ID is still attached. If I remove, the certificate ID comes back.
I can’t find a way to change or revert the Certificate ID without deleting and creating a new Load Balancer, which it’s bad because my production app (for example) stops responding while the DNS doesn’t propagate yet.
As a workaround, I could create another service/LB with the correct certificate, but it’s a bit odd to do this.
Anyone had an issue like this?
Thanks!
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!
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.
Hey Lucas!
From what you described, it looks like you’re using the annotation
service.beta.kubernetes.io/do-loadbalancer-certificate-id
to set the certificate for your Load Balancer. The behavior you’re seeing—where the old certificate ID remains even after updating the annotation—might be because the certificate ID is tied to the specific Load Balancer instance, and simply changing the annotation may not force a reload of the configuration.The good news is that DigitalOcean recently introduced an alternative annotation that might be more stable for your use case. So instead of using
service.beta.kubernetes.io/do-loadbalancer-certificate-id
, try usingservice.beta.kubernetes.io/do-loadbalancer-certificate-name
.As per the official documentation here:
Basically, this annotation uses the certificate’s name instead of the ID, which is helpful because:
Here’s how you can adjust your Service definition:
The main change is that you will be using the certificate name, the Load Balancer should automatically recognize the renewed certificate without you needing to update the annotation every time the certificate is rotated.
If the above solution doesn’t work immediately, you might need to:
For more details on using the annotations, check out the DigitalOcean docs here:
Let me know if this helps!
- Bobby