使用helm来安装以来,首先安装helm
1 | curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash |
然后使用helm安装对应的repo,对应的chart链接为:https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack
1 | helm repo add prometheus-community https://prometheus-community.github.io/helm-charts |
然后安装对应的chart,使用下面的命令
1 | helm install my-kube-prometheus-stack --namespace=monitoring prometheus-community/kube-prometheus-stack --version 18.0.0 --set prometheusOperator.admissionWebhooks.enabled=false --set prometheusOperator.admissionWebhooks.patch.enabled=false --set prometheusOperator.tls.enabled=false |
如果安装失败时,需要uninstall,也需要在helm对应的namespace下
1 | helm uninstall xxx -n monitoring |
相关的页面,有错时可以参考:
https://github.com/prometheus-community/helm-charts/issues/418
https://github.com/helm/charts/issues/21080#issuecomment-596958610