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

推荐订阅源

爱范儿
爱范儿
博客园_首页
U
Unit 42
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
MongoDB | Blog
MongoDB | Blog
美团技术团队
H
Help Net Security
G
Google Developers Blog
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
aimingoo的专栏
aimingoo的专栏
Google DeepMind News
Google DeepMind News
J
Java Code Geeks
M
MIT News - Artificial intelligence
腾讯CDC
IT之家
IT之家
Vercel News
Vercel News
C
Check Point Blog
博客园 - 三生石上(FineUI控件)
Last Week in AI
Last Week in AI
I
InfoQ
博客园 - 司徒正美
A
About on SuperTechFans

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