Storage
Create a
PersistentVolumeof1Gi, called'myvolume-practice'. Make it haveaccessModeof 'ReadWriteOnce' and 'ReadWriteMany',storageClassName'normal', mounted onhostPath'etc/foo'. List all PersistentVolumeCreate a PersistentVolumeClaim called '
mypvc-practice' requesting400MiwithaccessModeof 'ReadWriteOnce' andstorageClassNameofnormal. Check the status of the PersistenVolume.Create a busybox pod with command '
sleep 3600'. Mount the PersistentVolumeClaimmypvc-practiceto '/etc/foo'. Connect to the 'busybox' pod, and copy the '/etc/passwd' file to '/etc/foo/passwd'.Create a second pod which is identical with the one you just created (use different name). Connect to it and verify that '
/etc/foo' contains the 'passwd' file. Delete the pods.
Last updated
Was this helpful?