k8s 版本:v1.9 环境
:VirtualBox
操作系统:Coreos
它是 1 个节点 Kubernetes 集群,我按照以下步骤操作:
按照https://rook.io/docs/rook/v0.5/k8s-pre-reqs.html更新 kubelet
Environment="RKT_OPTS=--volume modprobe,kind=host,source=/usr/sbin/modprobe \
--mount volume=modprobe,target=/usr/sbin/modprobe \
--volume lib-modules,kind=host,源=/lib/modules\
--mount 卷=lib-modules,target=/lib/modules\
--uuid-file-save=/var/run/kubelet-pod.uuid"安装 ceph 实用程序
rbd -v ceph
版本 10.2.2 (45107e21c568dd033c2f0a3107dec8f0b0e58374)
所有 rook pod 都在工作,但 MySQL pod 失败并出现错误“超时已过期,等待卷附加/挂载 pod”
➜ kubectl get pod -n rook-system
NAME READY STATUS RESTARTS AGE
rook-agent-rqw6j 1/1 Running 0 21m
rook-operator-5457d48c94-bhh2z 1/1 Running 0 22m
➜ kubectl get pod -n rook
NAME READY STATUS RESTARTS AGE
rook-api-848df956bf-fhmg2 1/1 Running 0 20m
rook-ceph-mgr0-cfccfd6b8-8brxz 1/1 Running 0 20m
rook-ceph-mon0-xdd77 1/1 Running 0 21m
rook-ceph-mon1-gntgh 1/1 Running 0 20m
rook-ceph-mon2-srmg8 1/1 Running 0 20m
rook-ceph-osd-84wmn 1/1 Running 0 20m
➜ kubectl get pv
NAME CAPACITY ACCESSMODES RECLAIMPOLICY STATUS CLAIM STORAGECLASS REASON AGE
pvc-6a4c5c2a-127d-11e8-a846-080027b424ef 20Gi RWO Delete Bound default/mysql-pv-claim rook-block 15m
➜ kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESSMODES STORAGECLASS AGE
mysql-pv-claim Bound pvc-6a4c5c2a-127d-11e8-a846-080027b424ef 20Gi RWO rook-block 15m
kubectl get pods
NAME READY STATUS RESTARTS AGE
wordpress-mysql-557ffc4f69-8zxsq 0/1 ContainerCreating 0 16m
Error when I describe pod : FailedMount Unable to mount volumes for pod "wordpress-mysql-557ffc4f69-8zxsq_default(6a932df1-127d-11e8-a846-080027b424ef)": timeout expired waiting for volumes to attach/mount for pod "default"/"wordpress-mysql-557ffc4f69-8zxsq". list of unattached/unmounted volumes=[mysql-persistent-storage]
还在 rook-operator.yaml 中添加了以下选项
- name: FLEXVOLUME_DIR_PATH
value: "/var/lib/kubelet/volumeplugins"
你能帮忙吗?如果您需要更多详细信息,请告诉我。我检查了类似的问题,但解决方案不起作用。