Offer local storage from master node as PV

Cluster information:

Kubernetes version: 1.25.4
Cloud being used: bare-metal
Installation method: APT
Host OS: Ubuntu 22.04
CNI and version: Flannel (0.3.1)
CRI and version: containerd (1.6.10)

Hi folks!

Disclaimer (and as you’ll probably be able to distill from my question), I am super new to Kubernetes, I did Google this, but by the sheer lack of results I guess I wasn’t searching for the right thing.

So I have this little cluster set up, I bought 5 old Fujitsu Esprimo Q520s (pretty horrible hardware) and used one of them to run a master node and four as worker nodes. Just getting familiar with setting things up and all. The cluster is alive, which is great, but now I’m stuck at configuring storage/PVs.

The worker nodes all run on small (128GB) SSDs, but for the master I bought a slightly bigger (1TB) SSD that I want to use for cluster storage.

I know this is not very HA, but I don’t intend to run anything past my hobby projects here and am solely using this cluster to learn.

Now what’s not clear to me is how I can use this storage as a PV. I read about CSIs/PVs/PVCs, but I’m stuck at which CSI I should use.

The more I search on Google, the more it appears I can’t “natively” provide this master node disk as storage to the cluster, but I’d have to run an independent form of network storage, and only use the CSI as “glue” between that and K8s?

So my questions are:

  • Am I correct in understanding I will have to set up some sort of network file storage (outside of K8s, for example Samba) and connect that to K8s through a CSI?
  • If so, what would be your advice? What’s the cleanest, most reliable way to make this disk available?

You are correct. You’ll need some way to share the disk to the other nodes outside of K8s directly.

Easiest to get up and going with the least overhead would be NFS. You may have some issues if you intend to run databases etc. on there, but NFS would be my goto as the starter for a minimal home lab.

2 Likes

Alright, awesome! Couldn’t have wished for a clearer answer. Thank you, appreciate it!