Local Persistent Volume
Step 0: Create a Volume
mkdir -p /mnt/disk/vol1Give permissions
chmod 777 /mnt/disk/vol1Step 1: Configure StorageClass
kubectl apply -f 01-volume-binding.yamlStep 3: Configure Persistent Volume
You need to change the nodeSelectorTerms value to your own worker node name in the 02-lpv.yaml file. Use the worker node name on which you have created the vol1 folder in step 0
kubectl apply -f 02-lpv.yamlStep 4: Configure Persistent Volume Claim
kubectl apply -f 03-lpvc.yamlStep 5: Persistent volume claim is not bound to the persistent volume automatically. Instead, it will remain "Available" until the first consumer shows up
kubectl get pvStep 6: Deploy the Application
kubectl create -f 04-app.yamlkubectl get pvkubectl get podsLook at PV status is still "Bound", even though the POD is gone.
Scenario 1
Scenario 2
Verifying Multiple Read Access
Clear Everything in the current namespace
Run the Below command on those Nodes, where you have created the mount path.
If you are not aware then run this below command on all the nodes.
Last updated
Was this helpful?