oc exec and debug commands return "error: unable to upgrade connection: Unauthorized"

Solution Verified - Updated -

Issue

  • When attempting to exec into any Pod on a given Node, the following error is displayed:

    unable to upgrade connection: Unauthorized
    
  • The Node is also unable to be accessed using the oc debug nodes/<node> command.

  • This command does not provide a shell and presents the following warning.

    $ oc debug node/<node>
    Starting pod/<node>-debug ...
    To use host binaries, run `chroot /host`
    Pod IP: <Pod_IP>
    If you don't see a command prompt, try pressing enter.
    
    Removing debug pod ...
    error: unable to upgrade connection: Unauthorized
    

Environment

  • Red Hat OpenShift Container Platform
    • 4

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