• 安装部署监控日志
  • 【已解决】prometheus-k8s-0容器一直处于SchedulerError状态,无法使用监控功能

看下kubesphere-monitoring-system命名空间下pvc是否创建了

    showjason 没有PVC

    ~# kubectl -n kubesphere-monitoring-system get pvc
    NAME                                 STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS   AGE
    prometheus-k8s-db-prometheus-k8s-0   Pending                                      local          4h41m

      Mattie 分别查看一下 这个pvc的 event, 还有 openebs-localpv-provisioner的logs。

      kubectl -n kube-system logs openebs-localpv-provisioner-xx
      kubectl -n kubesphere-monitoring-system describe pvc xxx

        RolandMa1986

        没有`openebs-localpv-provisioner`的相关资源,都没有创建

        # kubectl get pod -n kube-system
        NAME                                      READY   STATUS    RESTARTS   AGE
        calico-kube-controllers-8f59968d4-7jqxt   1/1     Running   1618       175d
        calico-node-tntr5                         1/1     Running   19         175d
        coredns-65944cbcb8-8r7r8                  1/1     Running   21         175d
        coredns-65944cbcb8-pl4dv                  1/1     Running   18         175d
        kube-apiserver-ubuntu                     1/1     Running   12         175d
        kube-controller-manager-ubuntu            1/1     Running   21         175d
        kube-proxy-lrgnv                          1/1     Running   11         175d
        kube-scheduler-ubuntu                     1/1     Running   22         175d
        metrics-server-666566b66d-lq97w           1/1     Running   2          23h
        nodelocaldns-hdpsx                        1/1     Running   12         175d
        snapshot-controller-0                     1/1     Running   11         174d
        
        root@kubesphere2:~# kubectl get all -n kube-system | grep openebs
        root@kubesphere2:~# 
        # kubectl -n kubesphere-monitoring-system describe pvc prometheus-k8s-db-prometheus-k8s-0
        Name:          prometheus-k8s-db-prometheus-k8s-0
        Namespace:     kubesphere-monitoring-system
        StorageClass:  local
        Status:        Pending
        Volume:        
        Labels:        app=prometheus
                       prometheus=k8s
        Annotations:   volume.beta.kubernetes.io/storage-provisioner: openebs.io/local
                       volume.kubernetes.io/selected-node: ubuntu
        Finalizers:    [kubernetes.io/pvc-protection]
        Capacity:      
        Access Modes:  
        VolumeMode:    Filesystem
        Used By:       prometheus-k8s-0
        Events:
          Type    Reason                Age                     From                         Message
          ----    ------                ----                    ----                         -------
          Normal  ExternalProvisioning  17s (x1384 over 5h45m)  persistentvolume-controller  waiting for a volume to be created, either by external provisioner "openebs.io/local" or manually created by system administrator

          Mattie 有没有可能被意外删除了。 或是查看一下deployment 是否存在。都不再的话,可以手动装一个。

            RolandMa1986 应该不是被意外删除的,我安装后监控页面一开始就没有数据的。那请问是要手动安装deployment吗?有没有该 deployment 的 yaml file 可以参考一下呢,谢谢。

              Mattie 更改标题为「【已解决】prometheus-k8s-0容器一直处于SchedulerError状态,无法使用监控功能
              1 个月 后

              Mattie

              问下如果存在pvc情况,kubectl -n kubesphere-monitoring-system get pvc对应的prometheus-k8s-db-prometheus-k8s 处于Bound状态,我该如何处理?

              没有找到思路

                6 天 后

                liujie1008cn 不好意思我对这些也不是很了解,你可以寻求其他大佬的帮助。我之前出问题时prometheus-k8s-0容器有提示VolumeBinding的异常信息,你可以从异常信息那边看看是哪个方面的原因。

                  1 年 后

                  Mattie 你好,可以把最后的解决步骤写一下吗,我也遇到这个问题了 😀