Overview
In this article I’ll configure and verify Persistent Storage for the Kubernetes cluster.
Installation
This is a simple installation. The NFS server has 100 gigs of space which will be used for any Persistent Volume Claims (PVCs) needed by application.
Apply the following storage-pv.yaml file.
apiVersion: v1
kind: PersistentVolume
metadata:
name: storage-pv
spec:
capacity:
storage: 100Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
nfs:
path: /srv/nfs4/storage
server: 192.168.101.170
Verify by checking the PV in the cluster.
$ kubectl get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
storage-pv 100Gi RWX Retain Available 7s
And that’s it. Storage is now available for any applications.
Pingback: Kubernetes Index | Motorcycle Touring