Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upThe prometheus service account does not have enough Permissions #3918
Comments
This comment has been minimized.
This comment has been minimized.
|
It makes more sense to ask questions like this on the prometheus-users mailing list rather than in a GitHub issue. On the mailing list, more people are available to potentially respond to your question, and the whole community can benefit from the answers provided. |
brian-brazil
closed this
Mar 6, 2018
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
lock
bot
locked and limited conversation to collaborators
Mar 22, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
maryjomcguinness commentedMar 6, 2018
What did you do?
I tried to tail the Prometheus logs to see why I cannot see any metrics or targets or anything in the Prometheus UI so I ran:
./kubectl logs prometheus-deployment-5cfdf8f756-mpctk --namespace=monitoring
What did you expect to see?
A reason why I wasn't seeing any metrics
What did you see instead? Under which circumstances?
I saw the following
./kubectl logs prometheus-deployment-5cfdf8f756-mpctk --namespace=monitoring
level=error ts=2018-03-06T15:18:52.981806942Z caller=main.go:221 component=k8s_client_runtime err="github.com/prometheus/prometheus/discovery/kubernetes/kubernetes.go:268: Failed to list *v1.Endpoints: endpoints is forbidden: User "system:serviceaccount:monitoring:default" cannot list endpoints at the cluster scope"
level=error ts=2018-03-06T15:18:52.981851051Z caller=main.go:221 component=k8s_client_runtime err="github.com/prometheus/prometheus/discovery/kubernetes/kubernetes.go:354: Failed to list *v1.Node: nodes is forbidden: User "system:serviceaccount:monitoring:default" cannot list nodes at the cluster scope"
level=error ts=2018-03-06T15:18:52.981878974Z caller=main.go:221 component=k8s_client_runtime err="github.com/prometheus/prometheus/discovery/kubernetes/kubernetes.go:269: Failed to list *v1.Service: services is forbidden: User "system:serviceaccount:monitoring:default" cannot list services at the cluster scope"
level=error ts=2018-03-06T15:18:52.981907841Z caller=main.go:221 component=k8s_client_runtime err="github.com/prometheus/prometheus/discovery/kubernetes/kubernetes.go:296: Failed to list *v1.Pod: pods is forbidden: User "system:serviceaccount:monitoring:default" cannot list pods at the cluster scope"
I tried to resolve things by using the following file https://github.com/prometheus/prometheus/blob/master/documentation/examples/rbac-setup.ymland just changed the namespace to 'monitoring'
I then tried to run the following command using that rbac-setup.yml file:
./kubectl apply -f rbac-setup.yml
clusterrole "prometheus" created
serviceaccount "prometheus" created
clusterrolebinding "prometheus" created
And checked the service account was there:
./kubectl get serviceaccounts --namespace=monitoring
NAME SECRETS AGE
default 1 5d
prometheus 1 24s
However I am still getting the same errors in the logs and no metrics, targets or anything showing under Service Discovery in the UI.
Environment
System information:
insert output of
uname -srmhereDarwin 17.4.0 x86_64
Prometheus version:
insert output of
prometheus --versionhere2.1.0
Alertmanager version:
insert output of
alertmanager --versionhere (if relevant to the issue)Prometheus configuration file: