使用 Helm 安装后 Prometheus 服务器处于挂起状态

2024-02-16

我是 k8s 的新手,正在尝试为 k8s 设置 prometheus 监控。我用了 “helm install”来设置普罗米修斯。现在:

  1. two pods are still in pending state:
    • 普罗米修斯服务器
    • 普罗米修斯警报管理器
  2. 我手动为两者创建了持久卷 任何人都可以帮助我如何将这些 PV 与 Helm Chart 创建的 PVC 进行映射吗?
[centos@k8smaster1 ~]$ kubectl get pod -n monitoring
NAME                                             READY   STATUS    RESTARTS   AGE
prometheus-alertmanager-7757d759b8-x6bd7         0/2     Pending   0          44m
prometheus-kube-state-metrics-7f85b5d86c-cq9kr   1/1     Running   0          44m
prometheus-node-exporter-5rz2k                   1/1     Running   0          44m
prometheus-pushgateway-5b8465d455-672d2          1/1     Running   0          44m
prometheus-server-7f8b5fc64b-w626v               0/2     Pending   0          44m
[centos@k8smaster1 ~]$ kubectl get pv
prometheus-alertmanager   3Gi        RWX            Retain           Available                                                                       22m
prometheus-server         12Gi       RWX            Retain           Available                                                                       30m
[centos@k8smaster1 ~]$ kubectl get pvc -n monitoring
NAME                      STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS   AGE
prometheus-alertmanager   Pending                                                     20m
prometheus-server         Pending                                                     20m
[centos@k8smaster1 ~]$ kubectl describe pvc prometheus-alertmanager -n monitoring
Name:          prometheus-alertmanager
Namespace:     monitoring
StorageClass:
Status:        Pending
Volume:
Labels:        app=prometheus
               chart=prometheus-8.15.0
               component=alertmanager
               heritage=Tiller
               release=prometheus
Annotations:   <none>
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode:    Filesystem
Events:
  Type       Reason         Age                  From                         Message
  ----       ------         ----                 ----                         -------
  Normal     FailedBinding  116s (x83 over 22m)  persistentvolume-controller  no persistent volumes available for this claim and no storage class is set
Mounted By:  prometheus-alertmanager-7757d759b8-x6bd7

我期望 Pod 进入运行状态

!!!更新!!!

NAME                      STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS    AGE
prometheus-alertmanager   Pending                                      local-storage   4m29s
prometheus-server         Pending                                      local-storage   4m29s
[centos@k8smaster1 prometheus_pv_storage]$ kubectl describe pvc prometheus-server -n monitoring
Name:          prometheus-server
Namespace:     monitoring
StorageClass:  local-storage
Status:        Pending
Volume:
Labels:        app=prometheus
               chart=prometheus-8.15.0
               component=server
               heritage=Tiller
               release=prometheus
Annotations:   <none>
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode:    Filesystem
Events:
  Type       Reason                Age                   From                         Message
  ----       ------                ----                  ----                         -------
  Normal     WaitForFirstConsumer  11s (x22 over 4m59s)  persistentvolume-controller  waiting for first consumer to be created before binding
Mounted By:  prometheus-server-7f8b5fc64b-bqf42

!!更新2!!

[centos@k8smaster1 ~]$ kubectl get pods prometheus-server-7f8b5fc64b-bqf42 -n monitoring  -o yaml
apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: "2019-08-18T16:10:54Z"
  generateName: prometheus-server-7f8b5fc64b-
  labels:
    app: prometheus
    chart: prometheus-8.15.0
    component: server
    heritage: Tiller
    pod-template-hash: 7f8b5fc64b
    release: prometheus
  name: prometheus-server-7f8b5fc64b-bqf42
  namespace: monitoring
  ownerReferences:
  - apiVersion: apps/v1
    blockOwnerDeletion: true
    controller: true
    kind: ReplicaSet
    name: prometheus-server-7f8b5fc64b
    uid: c1979bcb-c1d2-11e9-819d-fa163ebb8452
  resourceVersion: "2461054"
  selfLink: /api/v1/namespaces/monitoring/pods/prometheus-server-7f8b5fc64b-bqf42
  uid: c19890d1-c1d2-11e9-819d-fa163ebb8452
spec:
  containers:
  - args:
    - --volume-dir=/etc/config
    - --webhook-url=http://127.0.0.1:9090/-/reload
    image: jimmidyson/configmap-reload:v0.2.2
    imagePullPolicy: IfNotPresent
    name: prometheus-server-configmap-reload
    resources: {}
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    volumeMounts:
    - mountPath: /etc/config
      name: config-volume
      readOnly: true
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: prometheus-server-token-7h2df
      readOnly: true
  - args:
    - --storage.tsdb.retention.time=15d
    - --config.file=/etc/config/prometheus.yml
    - --storage.tsdb.path=/data
    - --web.console.libraries=/etc/prometheus/console_libraries
    - --web.console.templates=/etc/prometheus/consoles
    - --web.enable-lifecycle
    image: prom/prometheus:v2.11.1
    imagePullPolicy: IfNotPresent
    livenessProbe:
      failureThreshold: 3
      httpGet:
        path: /-/healthy
        port: 9090
        scheme: HTTP
      initialDelaySeconds: 30
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 30
    name: prometheus-server
    ports:
    - containerPort: 9090
      protocol: TCP
    readinessProbe:
      failureThreshold: 3
      httpGet:
        path: /-/ready
        port: 9090
        scheme: HTTP
      initialDelaySeconds: 30
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 30
    resources: {}
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    volumeMounts:
    - mountPath: /etc/config
      name: config-volume
    - mountPath: /data
      name: storage-volume
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: prometheus-server-token-7h2df
      readOnly: true
  dnsPolicy: ClusterFirst
  enableServiceLinks: true
  priority: 0
  restartPolicy: Always
  schedulerName: default-scheduler
  securityContext:
    fsGroup: 65534
    runAsGroup: 65534
    runAsNonRoot: true
    runAsUser: 65534
  serviceAccount: prometheus-server
  serviceAccountName: prometheus-server
  terminationGracePeriodSeconds: 300
  tolerations:
  - effect: NoExecute
    key: node.kubernetes.io/not-ready
    operator: Exists
    tolerationSeconds: 300
  - effect: NoExecute
    key: node.kubernetes.io/unreachable
    operator: Exists
    tolerationSeconds: 300
  volumes:
  - configMap:
      defaultMode: 420
      name: prometheus-server
    name: config-volume
  - name: storage-volume
    persistentVolumeClaim:
      claimName: prometheus-server
  - name: prometheus-server-token-7h2df
    secret:
      defaultMode: 420
      secretName: prometheus-server-token-7h2df
status:
  conditions:
  - lastProbeTime: null
    lastTransitionTime: "2019-08-18T16:10:54Z"
    message: '0/2 nodes are available: 1 node(s) didn''t find available persistent
      volumes to bind, 1 node(s) had taints that the pod didn''t tolerate.'
    reason: Unschedulable
    status: "False"
    type: PodScheduled
  phase: Pending
  qosClass: BestEffort

我还创建了卷并将其分配给本地存储

[centos@k8smaster1 prometheus_pv]$ kubectl get pv -n monitoring

prometheus-alertmanager   3Gi        RWX            Retain           Available                                               local-storage            2d19h
prometheus-server         12Gi       RWX            Retain           Available                                               local-storage            2d19h


如果你在EKS,你的节点需要有下一个权限

arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy

and the 亚马逊 EBS CSI 驱动程序 Add-on

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用 Helm 安装后 Prometheus 服务器处于挂起状态 的相关文章

  • IE8 和怪异模式

    IE8 是否像 IE6 7 一样以怪异模式运行 我有一个网页 其中有一些非常奇怪的代码 内容以填充和负边距居中 它在 IE6 7 和其他浏览器中可以正常工作 但在 IE8 中 内容区域的宽度只有一半并且不居中 怪异模式的标志 源代码在 DO
  • 在 Ruby 中生成 GUID

    我有一个问题 用 GUID 很容易解决 特别是 对于密码重置工作流程 我想将 GUID 令牌发送到用户的电子邮件并让他们使用该令牌重置密码 由于 GUID 是唯一的 因此这非常安全 并且可以避免我通过电子邮件向人们发送密码 这是有风险的 我
  • 别名在 Bash 脚本中不起作用[重复]

    这个问题在这里已经有答案了 我有一个可执行文件command sh bin bash alias my command echo ok my command 我的终端是bash 当我像这样运行时 command sh 效果很好 当我像这样运
  • 蓝牙 LE 中步数计数的服务和特性是什么?

    低功耗蓝牙中步数的服务 特征值 UUID 是什么 蓝牙文档的相应页面没有列出任何步骤 如何计算步数 计步设备是否使用跑步速度和步频服务 谢谢 有些设备确实使用跑步速度和节奏服务 您应该能够通过将 总距离 除以 瞬时步长 两者都可以在RSC测
  • 强制函数调用的顺序?

    假设我有一个抽象基类 并且我想要一个必须由派生类实现的纯虚方法 但我想确保派生方法以特定顺序调用函数 我可以做什么来强制执行它 I E base class virtual void doABC 0 virtual void A 0 vir
  • 从 Ruby 运行 shell 命令:在显示输出时捕获输出?

    我有个问题 我想从另一个 ruby 脚本运行一个 ruby 脚本并捕获它的输出信息 同时让它也输出到屏幕上 runner usr bin env ruby print Enter your password password gets ch
  • 用于将用户发送至设备应用商店上的应用评论页面的 URL

    为了将 iTunes App Store 置于最前面并打开它以显示应用程序的评论页面 要启动的 URL 是什么 我想将我的用户发送到 撰写评论 页面 其他一些 SO 答案提供了如下 URL 但它似乎不起作用 itms apps itunes
  • 如何在服务器上获取球衣日志?

    我正在使用球衣进行 REST WS 如何在服务器端启用球衣日志 很长的故事 我收到客户端异常 但我在 tomcat 日志中没有看到任何内容 它甚至没有到达我的方法 由于堆栈跟踪显示 toReturnValue 它确实从服务器获取了一些内容
  • Asp.Net Core 中的 SSL 不起作用

    我从 Visual Studio 创建了一个简单的 Web 应用程序Web Application Net Core 具有个人用户帐户授权的模板 然后 我启用了 SSLProject gt MyProject Properties 将带有
  • JAAS keytab 配置的相对路径

    我有一个系统 其中 NET 客户端使用 Kerberos 针对 Java 服务器进行身份验证 一切正常 但我正在尝试改进服务器配置 目前一个keytab根目录中需要文件C 因为我的jaas配置文件看起来像这样 Server com sun
  • Angular2排序数组用于在html中的*ngFor中显示

    我正在循环浏览所有帖子 li 当显示每个帖子的日期时 我会执行以下操作 post date date yyyy MM dd HH mm ss 我想要做的是按最新的第一个顺序显示所有帖子 我尝试过使用类似的管道 li li import Pi
  • CMake 中的 FindSDL2 发生了什么?

    我在游戏中使用 SDL2 我一直使用自定义 FindSDL2 cmake 因为标准 CMake 集中没有 然而 前段时间确实出现了有关 FindSDL2 的帖子 例子 红迪网帖子 https www reddit com r opengl
  • 捕获 SQLAlchemy 异常

    我可以使用什么捕获 SQLAlechmy 异常的上层异常 gt gt gt from sqlalchemy import exc gt gt gt dir exc ArgumentError CircularDependencyError
  • Pandas:如何删除以 nan 作为列名的多个列?

    根据标题 这是一个可重现的示例 raw data x this that this that this np nan np nan np nan np nan np nan np nan y np nan np nan np nan np
  • 如何通过API退出Win32应用程序?

    我有一个使用 Win32 API 编写的 C Win32 应用程序 我希望强制它在其中一个函数中退出 有没有类似的东西Exit or Destroy or Abort 类似的东西会终止它吗 哎呀呀呀呀呀呀 不要做任何这些事情 exit 和
  • Google Analytics PHP(发送信息)

    大意 我正在开发一个项目 我需要使用 Google Analytics 服务器端 我不需要检索信息 但我需要发送信息 我最终可以发送 js 脚本客户端 但在这种情况下它不是一个选项 以下大多数链接都非常旧 2012年 检索 不是我需要的 我
  • Apache Flink - “keyBy”中的异常处理

    由于代码错误或缺乏验证 进入 Flink 作业的数据可能会触发异常 我的目标是提供一致的异常处理方式 我们的团队可以在 Flink 作业中使用这种方式 而不会导致生产中出现任何停机 重启策略似乎不适用于此处 因为 简单的重启无法解决问题 我
  • 创建进程默认浏览器

    我目前正在使用 ShellExecute 打开 在用户浏览器中打开 URL 但在 Win7 和 Vista 中遇到了一些麻烦 因为该程序作为服务运行提升 我想获取线程 id 因此 ShellExecute 无法获取线程 id 因此我开始使用
  • 如何循环遍历颜色数组以更改按键背景(按下/向下)

    互联网 如果这与其他人没有什么关系 请原谅我 但我会将其留在这里 以防这是一个有效的问题 我正在尝试创建一个文本区域字段 其中用户每次按下键 a z 都会触发背景颜色更改 在数组中列出 我一直在用 JQuery 做这件事 我想我已经很接近了
  • 如何使用 WinJS 以编程方式关闭 Win8 应用程序中的 MessageDialog?

    Here is 类似的问题 https stackoverflow com questions 12698666 how to close message dialog programmatically关于如何以编程方式关闭 Win8 应用

随机推荐

  • Pgadmin4 中的“加密密钥丢失”错误是什么以及如何解决?

    我正在使用 pgadmin 版本 6 1 我正在尝试使用本地计算机上的 pgadmin 连接到托管在 docker 中的 postgres 数据库 我使用以下命令来获取 docker 容器的 IP 地址 docker检查 f range N
  • iOS 中如何将地图区域限制为一个国家/地区?

    我正在使用mapkit 为iOS 制作一个应用程序 我想将地图的边界限制为特定的地区 国家 有没有办法做到这一点 无法告诉地图不要滚动到某个区域之外 我能想到的唯一方法是当您撞到栅栏之一时阻止用户滚动 下面的示例是在没有测试或编译的情况下编
  • WP7 模拟器浏览器不显示任何内容

    我使用 webbrowser 控件显示应用程序中的网页 但它只显示白屏 我尝试了 Internet Explorer 但它也没有显示任何内容 任何想法如何解决这个问题 预先非常感谢 Windows Phone 模拟器需要具有 DirectX
  • 如何使用OpenCV中的convertScaleAbs()函数?

    我试图在应用索贝尔过滤后将图像转换回灰度 我有以下代码 import numpy as np import matplotlib pyplot as plt import cv2 image cv2 imread train jpg img
  • 出于安全原因,escapeshellarg() 已被禁用

    当我想以任何形式上传任何内容时 我会看到警告 出于安全原因 escapeshellarg 已被禁用在我的网站上留言 我可以做什么来解决这个问题 我的框架是 codeigniter 最终版本 这是完整的警告 A PHP Error was e
  • 垂直可滚动组件的测量具有无限大的最大高度限制,这是不允许的

    我在 recyclerview 项目布局中使用 ComposeView 来与 jetpack compose 一起使用 当我打开屏幕时遇到奇怪的问题 Error java lang IllegalStateException Vertica
  • 选择元素上的 IE6/IE7 css 边框

    有谁有使用 CSS 来设置 Internet Explorer 中 选择 元素边框样式的解决方案吗 据我所知 这在 IE 中是不可能的 因为它使用操作系统组件 这里有一个link http v2 easy designs net artic
  • mysql错误1451

    我有 mysql 错误 代码为 1451 无法删除或更新父行 外键约束失败 online store admin osa admin logs 约束fk admins logs外键 aid 参考osa admins aid 这里sql语句
  • Log4J – 运行时变量替换

    Log4J http logging apache org log4j 1 2 index html似乎有一个恼人的限制 在运行时 变量替换似乎不起作用 在这个例子中 文件 Log4j properties file pattern d I
  • 终止应用程序未捕获的异常“NSInvalidArgumentException”

    我在控制台中收到以下错误 终止应用程序未捕获的异常 NSInvalidArgumentException 原因 NSPlaceholderDictionary initWithObjects forKeys count 尝试从对象插入nil
  • Has_Many :通过 或 :finder_sql

    我已经确定了我想要的东西 但我似乎无法以 Rails 设计师正在寻找的方式得到它 基本上 我有 请搁置复数 等问题 人类 关系 父母 子女 我试图获取单亲的所有后代 以及许多后代的单亲 假设每个后代只有一个父母 我可以在模型中通过以下方式执
  • Jquery删除通过jquery svg库添加的绘制线

    在我的应用程序中 我通过 jQuery SVG 插件从一个表格单元格到另一个单元格绘制了一条线 按照博文的步骤进行操作http www openstudio fr Library for simple drawing with html h
  • 尝试重载运算符“/”时出错

    我最近开始自学游戏编程 有人推荐我从Python开始 我得到了 用Python和Pygame开始游戏开发 从新手到专业 这本书 我到达了他们教授向量和创建 Vector2 类的部分 一切都很顺利 直到我试图让除法运算符超载 我的代码是这样的
  • Django 事务管理块以挂起的 COMMIT/ROLLBACK 结束

    我有一个需要手动事务管理的视图功能 但是当我应用 transaction commit manually装饰器 django 总是引发以下异常 正如您从下面的代码跟踪中看到的 事务是在从视图返回之前提交的 我在 Windows 和 Linu
  • Laravel 4 开箱即用的语法错误

    我刚刚安装了 Laravel 4 Illuminate 当我在浏览器中打开 index php 文件时 遇到了以下错误 解析错误 语法错误 意外的 yield T YIELD 在 www Laravel4 vendor Illuminate
  • Tarjan 强连通分量算法的功能实现

    我继续说 实施的 https github com pathikrit scalgos blob master src main scala com github pathikrit scalgos Graph scala L139 the
  • 存储函数中的临时表?

    我正在编写一个函数 我需要使用TABLE变量 我听说 MySQL 中不存在它们 https stackoverflow com questions 1524858 create table variable in mysql 或临时表 但是
  • 如何仅在用户身份验证后设置 Apollo 客户端?

    我对如何构建我的 React GraphQL Apollo 应用程序感到有点困惑 因为在用户验证 登录之前不应建立连接 目前我有这个 class App extends Component render return
  • iPhone最多可以监控多少个区域?

    有人知道共享区域的最大数量是多少吗 如果超过它 您会收到 RegionMonitoringDidFail 电话吗 http developer apple com iphone library documentation CoreLocat
  • 使用 Helm 安装后 Prometheus 服务器处于挂起状态

    我是 k8s 的新手 正在尝试为 k8s 设置 prometheus 监控 我用了 helm install 来设置普罗米修斯 现在 two pods are still in pending state 普罗米修斯服务器 普罗米修斯警报管