版本
组件 | 版本 |
---|---|
kubernetes | 1.23.4 |
prometheus | 2.34.0 |
node-exporter | 1.3.1 |
grafana | 8.4.6 |
参考资料
prometheus 官网:https://prometheus.io/docs/pr…
prometheus 官网镜像:https://hub.docker.com/r/prom…
prometheus 官网示例:https://github.com/prometheus…
prometheu 部署
# 生成 deployment
kubectl create deployment prometheus --image=prom/prometheus:v2.34.0 --dry-run=client -o yaml > prometheus-deployment.yaml
# 生成 service
kubectl expose deployment prometheus --port=9090 --type=NodePort --target-port=9090 --name=prometheus -o yaml > prometheus-service.yaml
grafana 部署
# 生成 deployment
kubectl create deployment grafana --image=grafana/grafana-oss:8.4.6 --dry-run=client -o yaml > grafana-deployment.yaml
# 生成 service
kubectl expose deployment grafana --port=3000 --type=NodePort --target-port=3000 --name=grafana --dry-run=client -o yaml > grafana-service.yaml
node-exporter 部署
# 生成 deployment
kubectl create deployment node-exporter --image=prom/node-exporter:v1.3.1 --dry-run=client -o yaml > node-exporter-deployment.yaml
# 生成 service
kubectl expose deployment node-exporter --port=9100 --type=NodePort --target-port=9100 --name=grafana --dry-run=client -o yaml > node-exporter-service.yaml