首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在kubernetes中的特定节点上使用helm配置prometheus

在kubernetes中的特定节点上使用helm配置prometheus
EN

Stack Overflow用户
提问于 2021-04-28 01:36:23
回答 1查看 319关注 0票数 0

我正在尝试使用Kubernetes中的Helm配置Prometheus,并且我已经尝试执行下面的命令,并且部署成功。

代码语言:javascript
复制
$ helm install prometheus prometheus-community/prometheus --namespace prometheus --set 
nodeSelector.nodetype=infra
NAME: prometheus
LAST DEPLOYED: Tue Apr 27 22:47:20 2021
NAMESPACE: prometheus
STATUS: deployed

但是,当我尝试描述创建的pod时,我无法将nodeSelector值视为"nodetype=infra“。有人能告诉我我错过了什么地方吗?

代码语言:javascript
复制
$ kubectl get pods -n prometheus                              
NAME                                             READY   STATUS    RESTARTS   AGE
prometheus-alertmanager-7f86c968db-vln2x         2/2     Running   0          61m
prometheus-kube-state-metrics-6bfcd6f648-6cdbw   1/1     Running   0          61m
prometheus-node-exporter-7q9lh                   1/1     Running   0          61m
prometheus-pushgateway-54576f7765-6kjt5          1/1     Running   0          61m
prometheus-server-7c9b8dbfcd-9x48b               2/2     Running   0          61m

$ kubectl describe pod prometheus-alertmanager-7f86c968db-vln2x -n prometheus
Name:         prometheus-alertmanager-6bc84b9455-4g9mw
Namespace:    prometheus
Priority:     0
..
QoS Class:       BestEffort
Node-Selectors:  <none> --> This is the field I'm expecting to have "nodetype=infra"

Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-04-28 02:06:14

您需要为每个组件配置nodeSelector

代码语言:javascript
复制
alertmanager:
   nodeSelector:
      nodetype: infra
nodeExporter:
   nodeSelector:
      nodetype: infra
server:
   nodeSelector:
      nodetype: infra
pushgateway:
   nodeSelector:
      nodetype: infra

你可以找到所有的值here

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67288024

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档