Sudo

See the sudo explanation for further details.

CLI Usage

To elevate privileges to cluster-admin using the oc or kubectl CLI, specify the --as cluster-admin flag:

oc --as cluster-admin get nodes

This will impersonate the stated user for this command.

OpenShift Console

To elevate privileges to cluster-admin using the OpenShift web console, use the user impersonation feature:

  1. Login to the web console with your regular user

  2. Navigate to "User Management" → "Role Binding" in the sidebar

  3. Search for impersonate-cluster-admin in the rop right search box

  4. From the menu, choose "Impersonate User cluster-admin"

  5. You should now see a blue bar saying "Impersonating User" and the top right user info "cluster-admin"

This holds for the current session only. Once your session is finished (page reload, re-login), the permissions are gone.