看openebs-localpv-provisioner 和kube-scheduler-minikube 和kube-controller-manager-minikube的报错信息,就发现了问题
volumeClaimTemplates:
- metadata:
name: proxysql-data
spec:
accessModes:
- ReadWriteMany ## 就是这里了 不能用ReadWriteMany只能用ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: sc-file-hdd
volumeMode: Filesystem
解决
ReadWriteMany:volumn能被多个容器访问
ReadWriteOnce:volumn只能被一个容器访问
很好理解,statefulset本来就是有状态的数据,必须只能被每一个被一个容器访问
volumeClaimTemplates:
- metadata:
name: proxysql-data
spec:
accessModes:
- ReadWriteOnce # 这里改成ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: sc-file-hdd
volumeMode: Filesystem