Question

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

Become a contributor for community

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

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.