OC(1)
πΈ NAME β OC(1) manual πΈ
okay bestie, welcome to the OC(1) manual page β this is the Openshift CLI User Manuals zone, and this page is all about oc logout. It does exactly one iconic thing: end the current server session. Thatβs the whole vibe π
β¨
π¦ SYNOPSIS π¦
oc logout [OPTIONS]
π DESCRIPTION π
Log out of the active session by clearing saved tokens. Simple as that, no cap. π§
After login, an authentication token is stored in the config file. This command deletes that token on the server, and then removes the token from the configuration file. So itβs like a two-step goodbye: server-side token gone, then local config token gone. π
If youβre using an alternative authentication method like Kerberos or client certificates, your ticket or client certificate will not be removed from the current system, since these are typically managed by other programs. Instead, you can delete your config file to remove the local copy of that certificate or the record of your server login. Important vibe check: this command isnβt gonna clean those up for you. π
After logging out, if you want to log back into the server, use oc login. Easy. π₯
π OPTIONS INHERITED FROM PARENT COMMANDS π
These flags are inherited from the parent commands, bestie β hereβs the full lineup, no skips. π
--as=""β username to impersonate for the operation. User could be a regular user or a service account in a namespace. π«Ά--as-group=[]β group to impersonate for the operation; this flag can be repeated to specify multiple groups. π--as-uid=""β UID to impersonate for the operation. π--as-user-extra=[]β user extras to impersonate for the operation; this flag can be repeated to specify multiple values for the same key. β¨--cache-dir="/homeless-shelter/.kube/cache"β default cache directory. ποΈ--certificate-authority=""β path to a cert file for the certificate authority. π--client-certificate=""β path to a client certificate file for TLS. πͺͺ--client-key=""β path to a client key file for TLS. π--cluster=""β the name of the kubeconfig cluster to use. βοΈ--context=""β the name of the kubeconfig context to use. π§--disable-compression=falseβ iftrue, opt out of response compression for all requests to the server. π¦--insecure-skip-tls-verify=falseβ iftrue, the serverβs certificate will not be checked for validity. This will make your HTTPS connections insecure. β οΈ no cap, thatβs a real insecure vibe.--kubeconfig=""β path to the kubeconfig file to use for CLI requests. πΊοΈ--kuberc=""β path to the kuberc file to use for preferences. This can be disabled by exportingKUBECTL_KUBERC=falsefeature gate or turning off the featureKUBERC=off. ποΈ--match-server-version=falseβ require server version to match client version. π§©-n,--namespace=""β if present, the namespace scope for this CLI request. π--profile="none"β name of profile to capture. One of(none|cpu|heap|goroutine|threadcreate|block|mutex). π§ͺ--profile-output="profile.pprof"β name of the file to write the profile to. π--request-timeout="0"β the length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g.1s,2m,3h). A value of zero means donβt timeout requests. β³-s,--server=""β the address and port of the Kubernetes API server. π--tls-server-name=""β server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used. π‘οΈ--token=""β bearer token for authentication to the API server. ποΈ--user=""β the name of the kubeconfig user to use. π€--warnings-as-errors=falseβ treat warnings received from the server as errors and exit with a non-zero exit code. π¨
β EXAMPLE β
# Log out
oc logout
π SEE ALSO π
Peep oc(1), too β yes, comma included, thatβs canon. π
π§ HISTORY π§
June 2016 β Ported from the Kubernetes man-doc generator. π§π
π sign-off: Openshift / Openshift CLI User Manuals β June 2016 β OC(1). mwah, bestie π«Ά
π¦ where this page comes from
- nixpkgs unstable: openshift 4.22.0-202605222050
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms