Which RBAC role is required to get service account token?
Issue
-
We need a token for
prometheus-k8sservice accountto access metrics data, butoc serviceaccounts get-tokencommand run by a user withviewClusterRole fails with the following error.$ oc serviceaccounts get-token prometheus-k8s -n openshift-monitoring error: could not find a service account token for service account "prometheus-k8s" - Which RBAC role is required to get service account token?
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.