Closed brizzbuzz closed 2 years ago
Hi @unredundant đź‘‹
Your annotation name might be slightly off: it should be service.beta.kubernetes.io/do-loadbalancer-name
. See also the official documentation at https://github.com/digitalocean/digitalocean-cloud-controller-manager/blob/master/docs/controllers/services/annotations.md#servicebetakubernetesiodo-loadbalancer-name
Setting the LB ID annotation should only be required if you want to start owning an LB that was previously created. By default, our CCM will set the LB ID annotation automatically.
Let me know if this helps.
hmmm... I can definitely give this a shot, thanks!
the doc i linked above https://docs.digitalocean.com/products/kubernetes/how-to/configure-load-balancers definitely specifies kubernetes.digitalocean.com/load-balancer-id
as a valid annotation. Is the doc incorrect / out of date?
yep, looks like that did the trick, thanks again for the help!
Glad it worked for you!
To wrap up the discussion: I think the annotation for the LB ID was correct. It was only the one for the LB name that had to be adjusted.
Hi, I am trying to customize my load balancer name or id so I can pull it from a terraform
data
block, but unfortunately, the annotations do not seem to be working.This page https://docs.digitalocean.com/products/kubernetes/how-to/configure-load-balancers/ indicates that users should be able to set the load balancer id (it doesn't mention it, but feels like name should also be possible?)
I have a kubernetes service
And the load balancer gets provisioned at least, but instead of the name being
soft-serve-sandbox
, it is the default name. thankfully, the documentation is pretty great, and mentions thisSo I was able to cobble together a hack where I format the
UID
properly, slap ana
before it and I can access the LB that way.But this really would be much nicer if I could use the name via annotations as expected.