Report this

What is the reason for this report?

How do I automatically create a directory and mount a GlusterFS volume on Kubernetes workers?

Posted on January 14, 2021

Hello,

I’m just getting started deploying, managing and utilising Kubernetesfor parts of my workloads (the part of the workloads that are stateless). I’m therefore running an external storage cluster using GlusterFS. I know how to manage GlusterFS etc, but since there is no access to SSH on the worker nodes, and the amount of worker nodes scale up and down automatically depending on the performance and traffic of the cluster, I wondered if there was a way that I could tell my Kubernetes master to automatically create the folder and mount the GlusterFS volume to this folder.



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!

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.

Hi @stianm

One option you have to perform such an action on each and every node would be to run a privileged Daemonset. You could use the daemonset run the modifications you wish on each node. Please note that this may limit the supportability of your cluster. If the cluster configurations are changed that could lead to unintended errors or stability issues that our engineering and support team is unfamiliar with.

Here is the official docs on Daemonsets to help you get started: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/

Hope this helps!

Regards,

John Kwiatkoski Senior Developer Support Engineer - Kubernetes

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.