Question

External static provisioner for local persistent volumes in Kubernetes

Hi,

I am attempting to create a 3-node Elasticsearch cluster by following the instructions here. The operator creates a cluster with persistent volumes of 1GiB with the default storage class, which happens to be do-block-storage for DO managed Kubernetes (more details on how to provision persistent volume here).

However, I would like to use local PVs instead of network ones (Block Storage) as is recommended here. Is there a guide on how to go about this?

Thanks!


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.

Hello,

According to the official documentation, DigitalOcean recommends against using HostPath volumes with their Managed Kubernetes services because nodes are frequently replaced and all data stored on the nodes will be lost.

You can persist data in DigitalOcean Kubernetes clusters to block storage volumes using the DigitalOcean CSI plugin. The volume gets mounted to the node itself and then a PVC is created, so there should not really be any noticeable latency.

Alternatively, you could deploy an unmanaged Kubernetes cluster on a few Droplets as per the instructions here:

https://www.digitalocean.com/community/tutorials/how-to-create-a-kubernetes-cluster-using-kubeadm-on-ubuntu-18-04

Regards, Bobby