LAB11a: Dynamic Provisioning with StorageClass
LAB 50: Dynamic Provisioning with Storageclass
1️ Run an NFS server container
mkdir -p /srv/nfs
docker run -d --name nfs-server \
--privileged \
-v /srv/nfs:/nfsshare \
-p 2049:2049 \
-e SHARED_DIRECTORY=/nfsshare \
itsthenetwork/nfs-server-alpine:latestCheck container logs:
Find server IP:
PART 2 — Deploy NFS Subdir External Provisioner
2️ Create a Kubernetes namespace
** 3 Create the NFS Provisioner Deployment**
PART 3 — Create the StorageClass
4 Create StorageClass
PART 4 — Test Dynamic Provisioning
5 Create a PVC
6 Create a Pod that uses the PVC
Summary
Component
Purpose
Test - Filling up Storage Quota
** YAML: storage-filler.yaml**
Replace:
How to Run This
Apply PVC (example 1 GB)
What You Will Observe When PVC Becomes Full
1. dd write error
2. Events on Pod
3. Application behavior
4. NFS / host logs
Want the storage to fill even slower?
Write 50 MB every 10 seconds:
Reference
Last updated