prometheus-operator: "Basic auth failed"、"User not found" when access grafana.

kube version: 1.8.4 OS version: debian stretch

There returns {"message":"Basic auth failed"} on the web ui. image And this is the logs:

# kubectl logs -f grafana-558c5b5d-bhg8g -n monitoring -c grafana
t=2018-01-02T08:04:09+0000 lvl=info msg="Created default admin user: admin"
t=2018-01-02T08:04:09+0000 lvl=info msg="Starting plugin search" logger=plugins
t=2018-01-02T08:04:09+0000 lvl=warn msg="Plugin dir does not exist" logger=plugins dir=/var/lib/grafana/plugins
t=2018-01-02T08:04:09+0000 lvl=info msg="Plugin dir created" logger=plugins dir=/var/lib/grafana/plugins
t=2018-01-02T08:04:09+0000 lvl=info msg="Initializing CleanUpService" logger=cleanup
t=2018-01-02T08:04:09+0000 lvl=info msg="Initializing Alerting" logger=alerting.engine
t=2018-01-02T08:04:10+0000 lvl=info msg="Initializing Stream Manager"
t=2018-01-02T08:04:10+0000 lvl=info msg="Initializing HTTP Server" logger=http.server address=0.0.0.0:3000 protocol=http subUrl= socket=
t=2018-01-02T08:06:53+0000 lvl=eror msg="Basic auth failed" logger=context error="User not found"
t=2018-01-02T08:06:53+0000 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/ status=401 remote_addr=220.181.190.66 time_ms=0 size=31 referer=

I just followed this page: https://github.com/coreos/prometheus-operator/tree/master/contrib/kube-prometheus and exec the command hack/cluster-monitoring/deploy.

Have I missed anything?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 22 (9 by maintainers)

Most upvoted comments

Then…I found I missed a part: https://github.com/coreos/prometheus-operator/tree/master/contrib/kube-prometheus#monitoring-other-cluster-components

After creating these two files, controller-manager and scheduler turn up.

Thanx a looooooot for your time!! @gianrubio

Close it.

Please share what was your issue so other users can have the same benefit in the further.

I have some questions related to the next error that can help you to figure it out.

What are the status of the prometheus pod? Can you reach the prometheus pod inside the cluster? Tip: use kubectl exec Can you reach the prometheus service inside the cluster from the grafana container? (use the same address you have in the url above)

@gianrubio Finally I find the problem, thanks a lot for your time.

And I can not connect to the datasource…

image