OC(1)

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

πŸ’… OC(1) β€” like, the oc config manual, bestie

okay so this is oc config from the Openshift CLI User Manuals, and yes she's serving June 2016 vintage but the lore is still immaculate. grab a matcha 🍡 and let's get into it.


✨ NAME ✨

oc config β€” modify kubeconfig files πŸŽ€

🌸 SYNOPSIS 🌸

oc config [OPTIONS]

πŸ¦‹ DESCRIPTION πŸ¦‹

So you wanna modify kubeconfig files? iconic. you do it with subcommands, like this:

oc config set current-context my-context

and the way it loads stuff? okay this is the part where you gotta pay attention because the loading order follows these rules, no cap:

  • if the --kubeconfig flag is set, then only that file is loaded. the flag may only be set once, and no merging takes place. that's it, that's the whole vibe, one file only πŸ’…
  • if the $KUBECONFIG environment variable is set, then it's used as a list of paths (normal path delimiting rules for your system apply, iykyk). these paths are merged. and here's the tea: when a value is modified, it's modified in the file that defines the stanza. when a value is created, it's created in the first file that exists. and if no files in the chain exist? then it creates the last file in the list. slay, it always has a plan 🫢
  • otherwise, ${HOME}/.kube/config is used and no merging takes place. default behavior, lowkey the fallback queen.

πŸ‘‘ OPTIONS πŸ‘‘

  • --kubeconfig="" β€” use a particular kubeconfig file. one specific file, your choice, very main character.

🌈 OPTIONS INHERITED FROM PARENT COMMANDS 🌈

these ones come from the parent command, and yes they're all here, every single one, because we do not skip πŸ’–

  • --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, so go off.
  • --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. yeah that's the literal default path, don't ask, just accept πŸ“
  • --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 insecure, not cute-insecure. be so serious about this one.
  • --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). pick your fighter.
  • --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. zero is the "we'll wait forever, it's fine" option 😭
  • -s, --server="" β€” the address and port of the Kubernetes API server.
  • --tls-server-name="" β€” server name to use for server certificate validation. if it's 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. harsh but fair πŸ’€

🧚 SEE ALSO 🧚

the whole friend group, fr fr:

oc(1), oc-config-current-context(1), oc-config-delete-cluster(1), oc-config-delete-context(1), oc-config-delete-user(1), oc-config-get-clusters(1), oc-config-get-contexts(1), oc-config-get-users(1), oc-config-new-admin-kubeconfig(1), oc-config-new-kubelet-bootstrap-kubeconfig(1), oc-config-refresh-ca-bundle(1), oc-config-rename-context(1), oc-config-set(1), oc-config-set-cluster(1), oc-config-set-context(1), oc-config-set-credentials(1), oc-config-unset(1), oc-config-use-context(1), oc-config-view(1),

⭐ HISTORY ⭐

June 2016, ported from the Kubernetes man-doc generator. a classic, an elder, we respect her πŸ’œ


okay that's the whole page bestie, go forth and configure 😌✨

source/version: Openshift β€” Openshift CLI User Manuals β€” dated June 2016. mwah, that's the sign-off, love u, bye! πŸŽ€πŸ’–
πŸ“¦ where this page comes from