OC(1)

πŸ“¦
version 4.22.0 Β· 2 versions
, in nixpkgs unstable

πŸŽ€ 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 exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=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