Persistent Volume (PV) 和 Persistent Volume Claim (PVC) 操作命令:
- 创建 Persistent Volume:
使用 kubectl apply 命令通过 YAML 文件创建一个 Persistent Volume。
kubectl apply -f my-persistentvolume.yaml
- 查看所有 Persistent Volumes:
使用 kubectl get pv 命令查看集群中的所有 Persistent Volumes。
kubectl get pv
- 查看 Persistent Volume 的详细信息:
使用 kubectl describe pv 命令查看特定 Persistent Volume 的详细信息。
kubectl describe pv my-pv
- 创建 Persistent Volume Claim:
使用 kubectl apply 命令通过 YAML 文件创建一个 Persistent Volume Claim。
kubectl apply -f my-persistentvolumeclaim.yaml
- 查看所有 Persistent Volume Claims