...
Create PV YAML
Create a
pv.yaml
file with the following configuration, updating it as per your requirements:PV name
Namespace
Storage
Path
Server IP
Create PVC YAML
Create a
pvc.yaml
file with the following configuration, updating it as per your requirements:PVC name
Namespace
Storage
Info |
---|
To add multiple mounts, create |
...
separate PV and PVC files with unique names. For example, if you |
...
name the first set "nfs-pv" and "nfs-pvc, |
...
" name the next set "nfs-pv-another" and "nfs-pvc-another." Use these names consistently when adding mounts in deployments. |
Deploy PV and PVC
Deploy the PV/PVC YAML using kubectl:
Code Block shell
Copy code
kubectl apply -f pv.yaml -n <namespace> kubectl apply -f pvc.yaml -n <namespace>
Check the status of PV and PVC:
Persistent Volumes (
nfs-pv
) should be listed.Persistent Volume Claims (
pvc-claim-adeptia-lan
) should be listed.
NFS Mounting on Deployment
...