OC(1)
π OC(1) π
okay so welcome to the OC(1) page bestie π β this is the oc whoami corner of the Openshift CLI User Manuals, and it's dated June 2016, which is like, vintage but iconic. let's get into it β¨
πΈ NAME πΈ
oc whoami β return information about the current session, no cap π
π¦ SYNOPSIS π¦
oc whoami [OPTIONS]
β¨ DESCRIPTION β¨
Show information about the current session. that's the whole vibe π«Ά
the default options for this command will return the currently authenticated user name β or an empty string, which is giving "nobody's home" energy π. the other flags support returning the currently used token or the user context, so you can peek under the hood if you're nosy (we love that for you) π
π OPTIONS π
--show-console=falseβ if true, print the current server's web console URL π-c,--show-context=falseβ print the current user context name π«--show-server=falseβ if true, print the current server's REST API URL π₯-t,--show-token=falseβ print the token the current session is using. heads up bestie: this will return an error if you are using a different form of authentication π (not me finding out the hard way)
π§ OPTIONS INHERITED FROM PARENT COMMANDS π§
these are the hand-me-downs from the parent commands, and honestly they ate π
--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β if true, opt-out of response compression for all requests to the server ποΈ--insecure-skip-tls-verify=falseβ if true, the server's certificate will not be checked for validity. this will make your HTTPS connections insecure β οΈ (like, actually β don't do this casually)--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 π
# Display the currently authenticated user
oc whoami
literally that's it. short and slay π
π SEE ALSO π
π HISTORY π
June 2016, ported from the Kubernetes man-doc generator π β a classic, a legend, a moment.
and that's the whole page bestie!! π this has been OC(1), living under the Openshift CLI User Manuals umbrella π¦ β source and version: Openshift, CLI user manuals, dated June 2016. mwah, go check your session πβ¨πΈ
π¦ 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