使用 Prometheus Operator packaged by Bitnami 安装 Prometheus Operator
$ helm install prometheus bitnami/kube-prometheus
安装后 alertmanager-main 与 prometheus-k8s 无法正常运行
NAME READY AGE
statefulset.apps/alertmanager-main 0/3 34m
statefulset.apps/alertmanager-prometheus-alertmanager 1/1 11m
statefulset.apps/prometheus-k8s 0/2 34m
statefulset.apps/prometheus-prometheus-prometheus 1/1 11m
查看日志发现2个 ServiceAccount 没有在安装时没有自动创建
serviceaccount "alertmanager-main" not found
serviceaccount "prometheus-k8s" not found
请问如何解决?
helm 清单中没找到对应的配置,手动创建对应的 ServiceAccount 解决了
$ kubectl create serviceaccount alertmanager-main monitoring
$ kubectl rollout restart statefulset.apps/alertmanager-main -n monitoring
$ kubectl create serviceaccount prometheus-k8s -n monitoring
$ kubectl rollout restart statefulset.apps/prometheus-k8s -n monitoring