我创建了一个持久卷声明,并且随机持久卷名称绑定到该声明。可以修改持久卷名称,如果可以,过程是什么?
尝试以下:打开k8的仪表板,编辑pvc。但它会引发以下错误:spec: Forbidden: is immutable after creation except resources.requests for bound claims
kind: PersistentVolume
apiVersion: v1
metadata:
name: task-pv-volume
namespace: xxxxxxxx
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/data"
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: task-pv-claim
namespace: xxxxx
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
storageClassName: manual
volumeMode: Filesystem
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
task-pv-claim Bound task-pv-volume 10Gi RWX manual 16m