【发布时间】:2021-07-11 15:25:16
【问题描述】:
所以我从this tutorial 安装了kube-prometheus-stack:
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
kubectl create ns monitoring
helm install prometheus prometheus-community/kube-prometheus-stack -n monitoring
kubectl get all -n monitoring
然后我从 git prometheus-community/helm-charts 复制,修改 values.yaml 以满足我的需要(alertmanager 的东西),然后运行此命令以应用更新:
helm dependency update -n monitoring kube-prometheus-stack/ # one time
helm upgrade prometheus -n monitoring kube-prometheus-stack/
现在我需要 grafana 来使用共享密码,我创建了一个 basic-auth 秘密入口:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: monitoring-ingress
namespace: monitoring
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-secret: basic-auth
nginx.ingress.kubernetes.io/auth-realm: "Authentication Required"
spec:
rules:
- host: monitor.blabla.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: prometheus-grafana.monitoring
port:
number: 80
tls:
- hosts:
- monitor.blabla.com
secretName: monitor.blabla.com-cert
这些工作正常,但问题是,我需要更改 grafana 的内部配置(使其成为 passwordless),这样做的正确/正确方法是什么?
【问题讨论】:
标签: kubernetes prometheus kubernetes-helm grafana