Step-by-Step: Adding NFS Storage to Your Kubernetes Cluster

Learn Fast Make Things
Learn Fast Make Things
7.7 هزار بار بازدید - پارسال - #kubernetes
#kubernetes #microk8s  #homeserver #synology
In this video, we'll show you how to expand the capabilities of a Kubernetes cluster by adding shared storage. We'll be upgrading a home cluster by connecting a Synology NAS as an NFS server that can serve read-write-many persistent volumes.

But before we get into the demo, we'll explain why you would want to do this and the downsides of sticking with the default storage that comes with a Kubernetes cluster.

Kubernetes running on nodes are really designed to provide only compute resources. This means that if your compute workload needs to store things to a disk for anything other than temporary usage, it’ll need some place else to store that data.

On Kubernetes, that means declaring persistent volumes in the definition of your app. The issue though, that we start to run into immediately is the location and the availability of those requested storage volumes.

In this video, we'll show you how to solve this problem using the Kubernetes NFS provisioner (or NFS container storage interface). NFS servers have been around for forever and have provided a simple way for multiple workloads to connect to one disk. It even allows both workloads to read and write simultaneously. The NFS CSI allows a multi-node Kubernetes cluster to create and mount volumes that are backed by NFS. Installing and configuring the CSI is a one-time thing and after that, it's completely transparent to users of the cluster.

We'll walk you through the steps and show you how to set up a Kubernetes cluster to use NFS for provisioning volumes. The very first thing we need to do is have an NFS server. There are a bunch of ways to do this, and we'll show you two of them - adding NFS to one of your Kubernetes nodes or using a separate device for running NFS.

Follow along with us as we demonstrate how to set up a Kubernetes cluster with shared storage, allowing for greater flexibility and scalability in your workloads.

Products and software:
Synology NAS: https://amzn.to/3LguVpW
Disk: https://amzn.to/3ZXiSSG
Mac Mini: https://amzn.to/3ZYcjzl
TP Link switch: https://amzn.to/3LjtO9i
Riser: https://amzn.to/3YAiTLi
MicroK8s NFS Setup: https://microk8s.io/docs/nfs
Kubernetes CSI repo: https://github.com/kubernetes-csi

=======================================
I get a lot of questions about my gear so I've created a few lists of the stuff I use. These are affiliate links. If you click and literally buy anything, it helps support the channel! Thank you.

Here's a link to my home office gear: https://kit.co/AskCloudArchitech/my-h...
Here's a link to my youtube "studio" gear: https://kit.co/AskCloudArchitech/yout...
=======================================

My website for written versions of these vids: https://askcloudarchitech.com
==============================================================

00:00 - Intro
00:29 - Purpose of Kubernetes Storage Volumes
01:37 - Challenges with k8s Hostpath Volumes
03:15 - About the kubernetes NFS CSI
03:43 - Two ways to Add NFS
03:57 - Adding NFS to one of your nodes
04:31 - Setting up NFS on NAS
05:01 - Synology NAS NFS setup
05:28 - Installing the NFS CSI driver
06:07 - How to add a NFS Storage Class
08:01 - Creating a Persistent Volume Claim
08:39 - Adding a PVC to your deployment
پارسال در تاریخ 1401/12/21 منتشر شده است.
7,767 بـار بازدید شده
... بیشتر