【问题标题】:Rook: Timeout expired waiting for volumes to attach/mount for podRook:等待卷附加/挂载 pod 超时
【发布时间】:2018-07-28 15:36:52
【问题描述】:

k8s 版本:v1.9
环境:VirtualBox
操作系统:Coreos

它是 1 个节点的 Kubernetes 集群 我按照以下步骤操作:

  1. 关注https://rook.io/docs/rook/v0.5/k8s-pre-reqs.html 并更新了 kubelet

    Environment="RKT_OPTS=--volume modprobe,kind=host,source=/usr/sbin/modprobe \
    --mount 卷=modprobe,target=/usr/sbin/modprobe \
    --volume lib-modules,kind=host,source=/lib/modules \
    --mount 卷=lib-modules,target=/lib/modules \
    --uuid-file-save=/var/run/kubelet-pod.uuid"

  2. 已安装 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"

你能帮忙吗?如果您需要更多详细信息,请告诉我。我检查了类似的问题,但解决方案不起作用。

【问题讨论】:

  • 你看过kubelet的日志吗?
  • 是的。它给出了“没有匹配的音量插件”错误。我本可以粘贴日志,但几个小时前我把它销毁了。我将通过重新创建相同的错误来放置日志。

标签: kubernetes rook-storage


【解决方案1】:

您是否使用 cephfs 或 rbd 卷作为 Ceph 的后端?以下是一些需要检查的事项:

  1. 请确认您的 Pod 可以与 ceph 集群正常通信,这看起来像是与您尝试使用的 ceph 卷的通信存在问题。

  2. 检查您的 Ceph 卷插件是否设置正确。

  3. # kubectl get pv 的状态如何?

  4. 查看您的持久卷和声明。

  5. 您也可以试试 Root.io 工具,它们与 Ceph 对象存储有很好的集成。

【讨论】:

    猜你喜欢
    • 2018-06-12
    • 1970-01-01
    • 1970-01-01
    • 2022-07-14
    • 2021-07-14
    • 2016-12-24
    • 2021-11-26
    • 1970-01-01
    相关资源
    最近更新 更多