Kubernetes Cephfs:动态资源调配不起作用
当我使用大量的CEPFS时,它就起作用了。路径为/test,用户为testKubernetes Cephfs:动态资源调配不起作用,kubernetes,cephfs,Kubernetes,Cephfs,当我使用大量的CEPFS时,它就起作用了。路径为/test,用户为test apiVersion: v1 kind: Pod metadata: name: cephfs spec: containers: - name: cephfs image: kubernetes/pause volumeMounts: - mountPath: "/mnt/cephfs" name: cephfs volumes: - name: cephfs
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?有claimRoot
,您可以在这里看到用法
也可能这对您有所帮助。这里有
claimRoot
,您可以看到其中的用法
此外,这可能会对您有所帮助。根据此处的示例:“您需要使用存储类名创建pvc,然后在pod卷中使用pvc名称。根据此处的示例:“您需要使用存储类名创建pvc,然后在pod卷中使用pvc名称。”。
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