minikube 安装prometheus + grafana
一、版本信息
kubectl k8s server helm minikube 的版本如下:
二、helm 安装 prometheus
参考如下文章:
https://k21academy.com/docker-kubernetes/prometheus-grafana-monitoring/
# 添加helm repo
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add stable https://charts.helm.sh/stable
# 更新所有repo
helm repo update
# 安装kube-prometheus-stack
helm install prometheus prometheus-community/kube-prometheus-stack -n monitoring
# 端口转发
kubectl port-forward -n monitoring deployment/prometheus-grafana 3000
#或
kubectl port-forward -n monitoring svc/prometheus-grafana 3000:80
浏览器访问 http://127.0.0.1:3000
grafana 账号密码:
username: admin
password: prom-operator