# 创建
[root@master01 hpro]# kubectl apply -f pvc.yaml
persistentvolumeclaim/my-test created
[root@master01 hpro]#
[root@master01 hpro]#
[root@master01 hpro]#
# 查看
[root@master01 hpro]# kubectl get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
pvc-43b2cadc-7336-4e61-b1d6-4ca2000301e3 500Mi RWO Delete Bound default/my-test nfs-client 5s
[root@master01 hpro]# kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
my-test Bound pvc-43b2cadc-7336-4e61-b1d6-4ca2000301e3 500Mi RWO nfs-client 8s
[root@master01 hpro]# kubectl get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
pvc-43b2cadc-7336-4e61-b1d6-4ca2000301e3 500Mi RWO Delete Bound default/my-test nfs-client 16s