You should know on which worker node, you want to run your Pod. Based on that you need to run the above commands.
Step 1: Configure StorageClass
kubectlapply-f01-volume-binding.yaml
This command is not mandatory to run, however if you run this command. always verify your PV and PVC Status.
Step 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
kubectlapply-f02-lpv.yaml
Step 4: Configure Persistent Volume Claim
kubectlapply-f03-lpvc.yaml
Step 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 pv
Step 6: Deploy the Application
kubectlcreate-f04-app.yaml
kubectlgetpv
kubectlgetpods
Look 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.