Naresh Babu
Naresh Babu

Reputation: 772

prometheus operator helm chart failed to install due to prom admission serviceaccount error

I am trying to setup prometheus monitoring in Azure Kubernetes cluster.
Installed the prometheus operator using helm.

helm install prometheus-op-release stable/prometheus-operator --set global.rbac.create=false,prometheusOperator.serviceMonitor.interval=5s,alertmanager.enabled=false

After about 5 minutes, the installation timed out with below error,

Error: failed pre-install: timed out waiting for the condition

Looking into the cluster, noticed there is a new job prometheus-op-release-prom-admission-create created. It has a pod failing to create due to service account not found.

Error creating: pods "prometheus-op-release-prom-admission-create-" is forbidden: error looking up service account default/prometheus-op-release-prom-admission: serviceaccount "prometheus-op-release-prom-admission" not found

Do I need to create the service account before installing the chart? Looking at the service account name, feel its dynamic and created as part of the chart installation. But am new to helm charts, not sure where to look for troubleshooting.

kubectl version

Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.2", GitCommit:"cff46ab41ff0bb44d8584413b598ad8360ec1def", GitTreeStat e:"clean", BuildDate:"2019-01-10T23:35:51Z", GoVersion:"go1.11.4", Compiler:"gc", Platform:"darwin/amd64"}

Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.8", GitCommit:"c52f59bbba5fbf21fbb18e9a06f96e563fe4c20a", GitTreeStat e:"clean", BuildDate:"2020-01-31T20:00:26Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}

helm version

version.BuildInfo{Version:"v3.1.1", GitCommit:"afe70585407b420d0097d07b21c47dc511525ac8", GitTreeState:"clean", GoVersion:"go1.13.8"}

Upvotes: 1

Views: 6473

Answers (1)

Arghya Sadhu
Arghya Sadhu

Reputation: 44657

You need to remove global.rbac.create=false from the helm command. If you specify this it will not automatically create the service account.

Upvotes: 4

Related Questions