当我使用大量的cephfs时,它可以正常工作。路径为/test,用户为测试
apiVersion: v1
kind: Pod
metadata:
name: cephfs
spec:
containers:
- name: cephfs
image: kubernetes/pause
volumeMounts:
- mountPath: "/mnt/cephfs"
name: cephfs
volumes:
- name: cephfs
cephfs:
monitors:
- 10.16.154.78:6789
- 10.16.154.82:6789
- 10.16.154.83:6789
path: /test
user: test
secretRef:
name: ceph-test
readOnly: true但是当我创建一个这样的StorageClass时,它就不工作了
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: cephfs
provisioner: ceph.com/cephfs
parameters:
monitors: 10.16.154.78:6789,10.16.154.82:6789,10.16.154.73:6789
adminId: test
adminSecretName: ceph-test
adminSecretNamespace: default我想没有对path参数的支持,如何将path: /test传递给StorageClass yaml?
发布于 2019-07-30 16:13:35
这里有一个claimRoot,你可以在这个example中看到它的用法。
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: cephfs
provisioner: ceph.com/cephfs
parameters:
monitors: 172.24.0.6:6789
adminId: admin
adminSecretName: ceph-secret-admin
adminSecretNamespace: "kube-system"
claimRoot: /pvc-volumes另外,这个blog post可能会对你有所帮助。
https://stackoverflow.com/questions/57263717
复制相似问题