我正在尝试使用do-block-storage在digitalocean上使用kubernetes-helm创建mongodb-replicaset。由于mongodb建议使用xfs格式,我尝试使用xfs格式使用xfs格式化do-block-storage,但它似乎不起作用。你能帮我吗?谢谢。
persistentVolume:
enabled: true
## mongodb-replicaset data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
storageClass: "do-block-storage"
accessModes:
- ReadWriteOnce
size: 10Gi
parameters:
fsType: xfs
annotations: {}
您的自定义参数(values.yaml)存在两个问题:
volumeClaimTemplates: - metadata: name: datadir annotations: spec: accessModes: - "ReadWriteOnce" resources: requests: storage: "10Gi" storageClassName: "do-block-storage"
我可以看到两个可能的解决方法:
kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: do-block-storage-xfs namespace: kube-system annotations: storageclass.kubernetes.io/is-default-class: "true" provisioner: com.digitalocean.csi.dobs parameters: fstype: xfs