Lens: Deploying Prometheus with Lens reports errors

Created on 10 Oct 2019  路  6Comments  路  Source: lensapp/lens

Describe the bug
I've clicked on the Install button for metrics to have Lens deploy Prometheus. It does seem to be working as I do get metrics data in Lens now, however the StatefulSet for Prometheus is in a constant state of alarm with the following error:

create Pod prometheus-0 in StatefulSet prometheus failed error: pods "prometheus-0" is forbidden: error looking up service account lens-metrics/prometheus: serviceaccount "prometheus" not found

To Reproduce
Steps to reproduce the behavior:

  1. Go to settings
  2. Click on Install for Metrics
  3. Go to StatefulSets
  4. See error

Expected behavior
Prometheus to deploy without errors.

Environment (please complete the following information):

  • Lens Version: 2.1.2
  • OS: Ubuntu Studio 19.10
  • Installation method: snap
  • Kubernetes Cluster: 1.15.3 Digital Ocean Hosted

Kubeconfig:
Quite often the problems are caused by malformed kubeconfig which the application tries to load. Please share your kubeconfig, remember to remove any secret and sensitive information.

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: REDACTED
    server: https://REDACTED.ondigitalocean.com
  name: do-nyc3-pubserv
contexts:
- context:
    cluster: do-nyc3-pubserv
    user: do-nyc3-pubserv-admin
  name: do-nyc3-pubserv
current-context: do-nyc3-pubserv
kind: Config
preferences: {}
users:
- name: do-nyc3-pubserv-admin
  user:
    token: REDACTED

Most helpful comment

Please re-open... the ServiceAccount is there but still shows this error.

All 6 comments

I checked in on it this morning and the error has gone away?

hmm, makes me think that the StatefullSet might have gotten deployed before the related ServiceAccount. Essentially the deployment happens as kubectl apply -f bunch-of-yamls/ under the hood. This is quite common and as you saw, k8s eventually manages to get everything running. Although usually it should take only max few minutes as all the objects are created within seconds.

Please re-open... the ServiceAccount is there but still shows this error.

create Pod prometheus-0 in StatefulSet prometheus failed error: pods "prometheus-0" is forbidden: error looking up service account lens-metrics/prometheus: serviceaccount "prometheus" not found

Screen Shot 2020-04-02 at 5 47 23 PM

had same issue, but waiting 2-5 minutes (during the time found this 馃槄) resolves the issue for me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

snowmoonsoftware picture snowmoonsoftware  路  4Comments

diemus picture diemus  路  3Comments

fjudith picture fjudith  路  4Comments

aaronsssya picture aaronsssya  路  4Comments

magusd picture magusd  路  4Comments