oc command gives unauthorized authentication errors in OpenShift
Issue
- While using the
oc(OpenShiftClient)commands in OpenShift, likeoc get nodes,oc get pods,oc get events, the following error is highlighted:
You must be logged in to the server (the server has asked for the client to provide credentials)
Environment
- OpenShift Container Platform (OCP)
- 3.2+
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
