gpt4 book ai didi

kubernetes - Cephfs:动态配置不起作用

转载 作者:行者123 更新时间:2023-12-02 12:34:09 26 4
gpt4 key购买 nike

当我使用大量的cephfs时,它可以正常工作。路径是/ 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
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,您可以在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可能对您有所帮助。

关于kubernetes - Cephfs:动态配置不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57263717/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com