Question

Kubernetes Cluster Persistent Volumes Replica Attach

So here is the deal - I am wanting to setup a proper Kubernetes cluster and move my projects onto it. There are things I need;

  • Ability to horizontally scale based on load (Auto-Scale)
  • Ability to share a persistent volume claim
  • Ability to add more nodes as volume increases

What I am having an issue figuring out is the volume sharing. I get I can use Persistent Volumes to get the job done but with csi it uses ReadWriteOnce. Do I need to setup an NFS pod first and connect it to the Block Storage or is there another way.

I must tell you I am EXTREMELY new to Containerization, so please bear with me if my question.


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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

The issue with Spaces in this case is during migration from one service to another. I need a way to share php files between the web containers while I migrate to a new Laravel/Vue solution. I am not sure what the best way is for me to accomplish this and the only way I can visualize it in my head is to create one of the following:

  • Ceph/GlusterFS
  • NFS Volume
  • Spaces using s3fs

The long term goal (which I am sure is yours at DO as well) is to move everything to your managed services so in an ideal world I would have all my app services (frontend, api, socket.io) services running in containers, MySQL/Redis running in Managed Database and so on.

I think I just need to think about this more. I guess I look at this like how would this work with wordpress. I would think it would need to share data across the containers. Am I wrong?

Hey friend,

Thanks for asking this question here. You’re on a great path. As confusing as it can be to move into containerization at first, it sounds like you’ve got a pretty decent handle on it.

For what you’re wanting to do there, an NFS container is probably a somewhat ideal path. I’d like to consider a different path altogether though. Network file systems can be less than ideal. Something like object storage (Spaces, comparable to S3) tends to shine in the place of something like that. You might consider if this is usable for your project.

Jarland