Helm 安装 Kubernetes 监控套件

快速安装(无持久化)

[root@master ~]# helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
[root@master ~]# helm repo update
[root@master ~]# helm search  repo  kube-prometheus-stack 
NAME                                            CHART VERSION   APP VERSION     DESCRIPTION                                       
prometheus-community/kube-prometheus-stack      57.0.3          v0.72.0         kube-prometheus-stack collects Kubernetes manif...

[root@master ~]# helm install op prometheus-community/kube-prometheus-stack --namespace kube-monitor --create-namespace
NAME: op
LAST DEPLOYED: Wed Mar 20 16:52:30 2024
NAMESPACE: kube-monitor
STATUS: deployed
REVISION: 1
NOTES:
kube-prometheus-stack has been installed. Check its status by running:
  kubectl --namespace kube-monitor get pods -l "release=op"

Visit https://github.com/prometheus-operator/kube-prometheus for instructions on how to create & configure Alertmanager and Prometheus instances using the Operator.
  • 查看版本: helm search repo prometheus-community/kube-prometheus-stack --versions

  • 安裝指定版本: helm install my-prometheus prometheus-community/kube-prometheus-stack --version <version_number>

- 获取密码

NodPort 方式暴露

Ingress-nginx 方式

使用local pv持久化存储数据

参考: Helm 安装prometheus-stack 使用local pv持久化存储数据-CSDN博客

多节点存储持久化

  • 去除节点亲和性即可

其他方式

  • influxdb存储prometheus数据

  • mysql存储grafana数据

Last updated