Forrest logo
back to the oc tool

oc:tldr:5583b

oc: Log out from the current session.
$ oc logout
try on your machine

The "oc logout" command is used to log out from the current OpenShift cluster. It terminates the user's session and removes any locally stored authentication tokens, which are used to access the cluster's resources and perform commands.

When you log in to an OpenShift cluster using the "oc login" command, it generates authentication tokens that are stored on the local machine. These tokens are used for subsequent requests to the cluster's API.

By executing "oc logout", the authentication tokens are invalidated and removed. This means that you will no longer have access to the cluster's resources or be able to execute OpenShift commands until you log in again.

The "oc logout" command typically does not require any additional arguments. Once executed, it will log you out from the current cluster and you will need to log in again with valid credentials to regain access.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the oc tool