How to create kubeconfig for a certain serviceaccount in OpenShift 4.11?
Issue
- I need kubeconfig for a particular serviceaccount
- Unable to create kubeconfig with the
oc sa create-kubeconfig
command because of the following error:
Command "create-kubeconfig" 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 "some-serviceaccout"
Environment
- Red Hat Openshift Container Platform 4.11 and later
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.