惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
The GitHub Blog
The GitHub Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
小众软件
小众软件
博客园_首页
G
Google Developers Blog
Apple Machine Learning Research
Apple Machine Learning Research
MyScale Blog
MyScale Blog
Engineering at Meta
Engineering at Meta
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
D
Docker
B
Blog
雷峰网
雷峰网
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
宝玉的分享
宝玉的分享

mafeifan 的编程技术分享

mafengwo-mp3-downloader | mafeifan 的编程技术分享 示例页面 | mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 查看 default namespace 下的 default service account名称 mafeifan 的编程技术分享 检查日志 | mafeifan 的编程技术分享 bridge fdb show dev flannel.1 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享 mafeifan 的编程技术分享
mafeifan 的编程技术分享
2026-01-16 · via mafeifan 的编程技术分享

https://github.com/prometheus-operator/kube-prometheus

包含功能:

  • The Prometheus Operator
  • Highly available Prometheus
  • Highly available Alertmanager
  • Prometheus node-exporter
  • Prometheus Adapter for Kubernetes Metrics APIs
  • kube-state-metrics
  • Grafana

前提 ​

Desktop 4.12.0 开启 K8s 1.25

安装 ​

bash

# clone 对应的版本 release v0.11.0
git clone git@github.com:prometheus-operator/kube-prometheus.git
# 先安装CRD资源
kubectl apply --server-side -f manifests/setup
# 检查CRD安装情况
until kubectl get servicemonitors --all-namespaces ; do date; sleep 1; echo ""; done
# 替换为国内镜像,搜索 quay.io,如 image: quay.io/prometheus/node-exporter:v1.5.0,
# 替换为 quay.dockerproxy.com/prometheus/node-exporter:v1.5.0
# 参见: https://dockerproxy.com/docs
# 如果是Mac系统,注释 nodeExporter-daemonset.yaml 中的 mountPropagation: HostToContainer
kubectl apply -f manifests/
# 检查安装情况
kubectl get pod -n monitoring
# 进到dashboard页面
# kubectl --namespace monitoring port-forward svc/prometheus-k8s 9090
# grafana 用户名密码 admin admin
kubectl --namespace monitoring port-forward svc/grafana 3000
kubectl --namespace monitoring port-forward svc/alertmanager-main 9093

Grafana 已经内置了很多面板

报错 ​

failed to try resolving symlinks in path "/var/log/pods/monitoring_node-exporter-6hq8f_433e74b9-f343-42da-9293-beca9bdb6987/node-exporter/4.log": lstat /var/log/pods/monitoring_node-exporter-6hq8f_433e74b9-f343-42da-9293-beca9bdb6987/node-exporter/4.log: no such file or directory

k logs node-exporter-6hq8f  -n monitoring kube-rbac-proxy

Flag --logtostderr has been deprecated, will be removed in a future release, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components
W0108 10:10:43.193481   63974 kube-rbac-proxy.go:152] 
==== Deprecation Warning ======================

Insecure listen address will be removed.
Using --insecure-listen-address won't be possible!

The ability to run kube-rbac-proxy without TLS certificates will be removed.
Not using --tls-cert-file and --tls-private-key-file won't be possible!

For more information, please go to https://github.com/brancz/kube-rbac-proxy/issues/187

===============================================

I0108 10:10:43.193618   63974 kube-rbac-proxy.go:272] Valid token audiences: 
I0108 10:10:43.193682   63974 kube-rbac-proxy.go:363] Generating self signed cert as no cert is provided
I0108 10:11:38.849433   63974 kube-rbac-proxy.go:414] Starting TCP socket on [192.168.65.4]:9100
I0108 10:11:38.849787   63974 kube-rbac-proxy.go:421] Listening securely on [192.168.65.4]:9100
I0108 10:11:41.850336   63974 log.go:198] http: proxy error: dial tcp 127.0.0.1:9100: connect: connection refused
I0108 10:11:52.534207   63974 log.go:198] http: proxy error: dial tcp 127.0.0.1:9100: connect: connection refused
I0108 10:11:56.079702   63974 log.go:198] http: proxy error: dial tcp 127.0.0.1:9100: connect: connection refused
I0108 10:12:07.346623   63974 log.go:198] http: proxy error: dial tcp 127.0.0.1:9100: connect: connection refused

在Mac或Win上安装会有一些问题

需要注释 mountPropagation: HostToContainer