Storage
Create a
PersistentVolume
of1Gi
, called'myvolume-practice'
. Make it haveaccessMode
of 'ReadWriteOnce
' and 'ReadWriteMany
',storageClassName
'normal
', mounted onhostPath
'etc/foo
'. List all PersistentVolumeCreate a PersistentVolumeClaim called '
mypvc-practice
' requesting400Mi
withaccessMode
of 'ReadWriteOnce
' andstorageClassName
ofnormal
. Check the status of the PersistenVolume.Create a busybox pod with command '
sleep 3600
'. Mount the PersistentVolumeClaimmypvc-practice
to '/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?