Question

External static provisioner for local persistent volumes in Kubernetes

Posted July 30, 2021 105 views
KubernetesDigitalOcean Volumes

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!

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.

×
Submit an Answer
1 answer

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

by bsder
Kubernetes is a container orchestration system that manages containers at scale. Initially developed by Google based on its experience running containers in production, Kubernetes is open source and actively developed by a community around the world. In this guide, you will set up a Kubernetes cluster from scratch using Ansible and Kubeadm, and then deploy a containerized Nginx application to it.