oc logs command fails with error " You must be logged in to the server"

Solution Verified - Updated -


  • We are getting "An error occurred while retrieving the requested logs." when trying to view logs for any pod

    # oc logs <pod name>
    error: You must be logged in to the server (the server has asked for the client to provide credentials ( pods/log busybox-7b65c4fdf7-6psw9))


  • Red Hat OpenShift Container Platform 4.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content