Kubernetes deployment with 0 replicas and PVC

I’m trying to decide if node PVC attach limits are going to affect me and I can’t find any official documentation on this…

I wish to deploy many instances of a deployment. Each deployment has a single PVC with dedicated storage. Often, these deployments will be scaled to zero replicas (to save money). At these times, the deployments still have associated PVC and when the replicas scale up again, the PVC is still there like I would expect.

I know that DO limits each node to 7 attached PVCs at a time. This is fine, my deployments won’t be able to fit more than 7 replicas per node, so all is good.

However, I’m concerned that a deployment with 0 replicas, which still has a PVC might be counted against this limit. So, finally, to my question.

When a deployment, with PVC, is scaled to 0 replicas, do the PVCs remain attached to a node and if so do they count against the limit of PVCs for that node?

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.

Accepted Answer

I’ll answer my own question. I’ve scaled my deployment replicas to 0 and I can see in my console that the volume which backs the PVC is un-attached. Thus the PVCs aren’t attached to a node and can’t count against node limits.

That’s kind of what I expected but wanted to make sure.

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