模板与查看
模板与查看
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: ["ReadWriteOnce"]
storageClassName: fast-ssd
resources:
requests:
storage: 50Gi命令
命令
kubectl get pvc -l app=db
kubectl get pvc data-db-0 -o jsonpath='{.spec.storageClassName} {.status.capacity.storage}'
kubectl describe pvc data-db-1 | grep -A4 EventsPVC 命名规则:<模板名>-<sts名>-<序号>;扩容需 StorageClass 支持 allowVolumeExpansion,且改模板不会追溯已有 PVC。