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”.
cidr:22.214.171.124/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.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.