所有Kubernetes代理目标向下-普罗米修斯运营商 [英] All Kubernetes proxy targets down - Prometheus Operator

查看:11
本文介绍了所有Kubernetes代理目标向下-普罗米修斯运营商的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在OpenStack中部署了一个K8S集群。我已经为它部署了普罗米修斯操作员来监控集群。但我正在为所有节点设置Kubernetes Proxy关闭警报。

我想知道普罗米修斯运营商如何刮掉Kubernetes代理的基础知识?还想知道需要进行哪些配置才能修复它。

我可以看到Kube代理在所有节点的10249端口上运行。

错误:

Get http://10.8.10.11:10249/metrics: dial tcp 10.8.10.11:10249: connect: connection refused

舵值配置

kubeProxy:
  enabled: true

  ## If your kube proxy is not deployed as a pod, specify IPs it can be found on
  ##
  endpoints: []
  # - 10.141.4.22
  # - 10.141.4.23
  # - 10.141.4.24

  service:
    port: 10249
    targetPort: 10249
    # selector:
    #   k8s-app: kube-proxy

  serviceMonitor:
    ## Scrape interval. If not set, the Prometheus default scrape interval is used.
    ##
    interval: ""

    ## Enable scraping kube-proxy over https.
    ## Requires proper certs (not self-signed) and delegated authentication/authorization checks
    ##
    https: false

推荐答案

为指标绑定地址设置kube代理参数

$ kubectl edit cm/kube-proxy -n kube-system

...
kind: KubeProxyConfiguration
metricsBindAddress: 0.0.0.0:10249
...

$ kubectl delete pod -l k8s-app=kube-proxy -n kube-system

这篇关于所有Kubernetes代理目标向下-普罗米修斯运营商的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆