`` doesn't work with ``

When trying to set up firewall rules for a Load Balancer in front of my Kubernetes cluster, I was using the annotation mentioned here:

I wanted to only allow traffic from our VPC. It has a subnet of but setting "cidr:" failed. When looking at kubernetes events for my service, I saw that the Load Balancer was “ensuring” but never became “ensured”.

I tested cidr: 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?

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
December 2, 2023

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.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel