When trying to set up firewall rules for a Load Balancer in front of my Kubernetes cluster, I was using the annotation mentioned here: https://docs.digitalocean.com/products/kubernetes/how-to/configure-load-balancers/#allow-rules
I wanted to only allow traffic from our VPC. It has a subnet of 10.200.0.0/16
but setting service.beta.kubernetes.io/do-loadbalancer-allow-rules: "cidr:10.200.0.0/16"
failed. When looking at kubernetes events for my service, I saw that the Load Balancer was “ensuring” but never became “ensured”.
I tested cidr:11.200.0.0/16
and the Load Balancer appeared to work as expected; my services reported that the Load Balancer had become “ensured”.
Is there a way to use the VPC’s CIDR block?
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.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hey @caffeinestorm,
Is your Kubernetes cluster running version
1.24.8-do.0
or newer? If not this might explain the problem.If this is not the case, I could suggest reaching out to the DigitalOcean support team who might be able to investigate this further for you:
Hope that helps!
- Bobby.