OC-CONFIG-SET-CLUSTER(1)
π OC-CONFIG-SET-CLUSTER(1) π
okay so like, hi bestie!! π«Ά this is a page from the OC CONFIG manual (yes, that's the manual name, iconic), and honestly it's giving "i'm about to make your kubeconfig slay" energy. let's get into it β¨
πΈ NAME πΈ
oc config set-cluster β literally sets a cluster entry in kubeconfig. that's the whole vibe. no cap. π
π¦ SYNOPSIS π¦
oc config set-cluster [OPTIONS]
β¨ DESCRIPTION β¨
Set a cluster entry in kubeconfig. periodt. π
and here's the tea π: specifying a name that already exists will merge new fields on top of existing values for those fields. so it doesn't nuke your old stuff, it just layers the new stuff on top. lowkey considerate of it tbh.
π OPTIONS π
--certificate-authority=""β path to the certificate-authority file for the cluster entry in kubeconfig. like, where your CA lives. π--embed-certs=falseβ embed-certs for the cluster entry in kubeconfig. defaults tofalse, obviously.--insecure-skip-tls-verify=falseβ insecure-skip-tls-verify for the cluster entry in kubeconfig. alsofalseby default, bestie.--proxy-url=""β proxy-url for the cluster entry in kubeconfig.--server=""β server for the cluster entry in kubeconfig. the main character of your cluster config ngl. β--tls-server-name=""β tls-server-name for the cluster entry in kubeconfig.
π OPTIONS INHERITED FROM PARENT COMMANDS π
so these aren't even this command's own flags, they're just β¨ inherited β¨ from the parent command like family heirlooms. we love a legacy. π§
--as=""β username to impersonate for the operation. user could be a regular user or a service account in a namespace. iyk what that means (iykyk π)--as-group=[]β group to impersonate for the operation. this flag can be repeated to specify multiple groups. repeat away bestie π--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. yes, that's the actual path, don't come for me, i just work here π--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.--kubeconfig=""β use a particular kubeconfig file.--kuberc=""β path to the kuberc file to use for preferences. this can be disabled by exporting theKUBECTL_KUBERC=falsefeature gate or turning off the featureKUBERC=off. head's up fr fr π«Ά--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. so"0"is just vibes, forever π--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. strict queen behavior π
π EXAMPLE π
here's where it gets fun, bestie. these are verbatim, so copy-paste responsibly π«Ά
# Set only the server field on the e2e cluster entry without touching other values
oc config set-cluster e2e --server=https://1.2.3.4
# Embed certificate authority data for the e2e cluster entry
oc config set-cluster e2e --embed-certs --certificate-authority= /.kube/e2e/kubernetes.ca.crt
# Disable cert checking for the e2e cluster entry
oc config set-cluster e2e --insecure-skip-tls-verify=true
# Set the custom TLS server name to use for validation for the e2e cluster entry
oc config set-cluster e2e --tls-server-name=my-cluster-name
# Set the proxy URL for the e2e cluster entry
oc config set-cluster e2e --proxy-url=https://1.2.3.4
look at that. five examples. five little icons. we ate. π₯
π¦ SEE ALSO π¦
go check out the parent, it's giving "the whole family tree" energy πΈ
π HISTORY π
June 2016, Ported from the Kubernetes man-doc generator. vintage!! a classic. π
okay that's the whole page, bestie, you're officially educated β¨π and real quick, the cute little sign-off at the bottom of the original said Openshift, Openshift CLI User Manuals, and OC CONFIG(1) β that's the source/version info + footer β and it's dated June 2016. slay. π«Άπ
π¦ 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