Command "oc serviceaccounts get-token" is deprecated
Issue
- Not able to get the token for a service account with
get-token.
$ oc serviceaccounts get-token prometheus-k8s -n openshift-monitoring
Command "get-token" is deprecated, and will be removed in the future version. Use oc create token instead.
error: could not find a service account token for service account "prometheus-k8s"
Environment
- Openshift 4.11+
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.