安装kubesphere 过程中出现prometheus pod 卷失败
安装方式:

kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.2.1/kubesphere-installer.yaml

kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.2.1/cluster-configuration.yaml

报错信息

Warning FailedMount 5m43s kubelet Unable to attach or mount volumes: unmounted volumes=[prometheus-k8s-db], unattached volumes=[config config-out tls-assets prometheus-k8s-db prometheus-k8s-rulefiles-0 kube-api-access-p5gfc]: timed out waiting for the condition

Warning FailedMount 3m29s (x3 over 10m) kubelet Unable to attach or mount volumes: unmounted volumes=[prometheus-k8s-db], unattached volumes=[config-out tls-assets prometheus-k8s-db prometheus-k8s-rulefiles-0 kube-api-access-p5gfc config]: timed out waiting for the condition

Warning FailedMount 75s (x3 over 14m) kubelet Unable to attach or mount volumes: unmounted volumes=[prometheus-k8s-db], unattached volumes=[kube-api-access-p5gfc config config-out tls-assets prometheus-k8s-db prometheus-k8s-rulefiles-0]: timed out waiting for the condition

Warning FailedMount 29s (x16 over 16m) kubelet MountVolume.NewMounter initialization failed for volume “pvc-adb80b9f-289d-472c-b6b1-59f40c2e823d” : path “/var/openebs/local/pvc-adb80b9f-289d-472c-b6b1-59f40c2e823d” does not exist

pvc

pvc-adb80b9f-289d-472c-b6b1-59f40c2e823d 20Gi RWO Delete Bound kubesphere-monitoring-system/prometheus-k8s-db-prometheus-k8s-1 local-hostpath 23m

使用openebs localstorage 自动创建pv,在pod 对应节点上检查发现对应目录/var/openebs/local/pvc-adb80b9f-289d-472c-b6b1-59f40c2e823d 已被创建,并且权限是777

请问有谁遇到过这个问题吗?

    4 天 后

    pachuang 首先确定一下你的kubelet 是否以容器的形式启动的,如果是的话,看一下/var/openebs 目录是否bind 到了kubelet 对应的容器中了

      5 天 后

      nioshield 我的是通过如下方式解决的:

      解决方案:

      Current workaround is to edit /etc/kubernetes/manifests/kube-apiserver.yaml

      Under here:

      spec:
        containers:
        - command:
          - kube-apiserver

      Add this line:

      - –feature-gates=RemoveSelfLink=fals

      1 个月 后