Prometheus 不能访问k8s的中的一些metrics的问题(controller-manager、scheduler、etcd)

主要有三个点

controller-manager、scheduler、etcd

参考:

https://www.cnblogs.com/ltaodream/p/15448953.html

kube-scheduler

在每台master节点执行

vim /etc/kubernetes/manifests/kube-scheduler.yaml

将

--bind-address=127.0.0.1

改为

--bind-address=0.0.0.0

kube-controller-manager

vim /etc/kubernetes/manifests/kube-controller-manager.yaml

将

--bind-address=127.0.0.1

改为

--bind-address=0.0.0.0

etcd

vi /etc/kubernetes/manifests/etcd.yaml

将

--listen-metrics-urls=http://127.0.0.1:2381

改为

--listen-metrics-urls=http://127.0.0.1:2381,http://你主机的IP地址(也就是图上serviceMonitor中展示的访问不通的地址):2381

参考:serviceMonitor/default/kube-prometheus-stack-kube-etcd detect Incorrect metric port and connection reset by peer · Issue #1005 · prometheus-community/helm-charts · GitHub

重启kubelet

systemctl restart kubelet.service

ETCD grafana

模板号3070

相关推荐
JasonChen@6667 小时前
Grafana 权限管理实战:用户授权与 Team 团队管理(17)
grafana·prometheus
AR-26710-9 小时前
docker Day6——容器数据卷
运维·docker·容器
AR-26710-11 小时前
docker Day5——改动+systemf复习
运维·docker·容器
always20221 天前
AI运行时 · 06 - Kata 与 K8s 集成:RuntimeClass / CSI kata-directvolume / 性能开销与调优
人工智能·容器·kubernetes
赤生云电竞1 天前
GPU算力共享平台架构实践:任务分发与资源隔离——基于NVIDIA MIG与Kubernetes调度器的工程化拆解
架构·kubernetes·gpu算力
JasonChen@6661 天前
pushgateway组件实现自定义监控数据采集(16)
grafana·prometheus·pushgateway
Maiko Star1 天前
Docker保姆级部署AI应用程序(FastAPI)
docker·容器·fastapi
A-刘晨阳2 天前
Kubernetes 查询证书有效期及续签证书(适用于二进制部署)
云原生·容器·kubernetes·证书·cfssl
`Levie2 天前
Docker-安装部署、容器管理(一)
docker·容器·eureka
Z21-X2 天前
云原生运维学习笔记:Kubernetes 自动扩缩容与资源管控实战
运维·笔记·学习·云原生·kubernetes