我按照这个例子来创建带有音量的pod,https://github.com/kubernetes/kubernetes/blob/master/examples/cephfs/cephfs.yaml,我觉得对我来说有些不对劲 .
码头检查:
“/ mnt / cephfs”:“/ var / lib / kubelet / pods / 7631bff0-7155-11e5-9e8a-000c29de7e43 /volumes / kubernetes.io~empty-dir / emphfs”
而我的yaml是:
apiVersion: v1
kind: Pod
metadata:
name: cephfs
spec:
containers:
- name: cephfs-rw
image: centosphpok
volumeMounts:
- mountPath: "/mnt/cephfs"
name: cephfs
volumes:
- name: cephfs
cephfs:
monitors:
- 10.0.0.206:6789
user: admin
secretFile: "/etc/ceph/admin.secret"
readOnly: true
1 回答
您可能尝试的一件事是同时使用secretFile属性和创建Kubernetes Secret对象 .
这就是我的PersistentVolume的样子:
这是我的秘密: