KUBERNETES(1)(kubernetes)
β¨ KUBERNETES(1)(kubernetes) β the kubectl config set-cluster era β¨
okay bestie, pull up a chair, we're reading a kubectl manual page together and honestly? it's giving essential. this one lives in the kubernetes manual, section 1, and it was penned by Eric Paris back in Jan 2015. yes, that Eric Paris. we stan a legend. π
πΈ NAME πΈ
kubectl config set-cluster β Set a cluster entry in kubeconfig
π SYNOPSIS π
kubectl config set-cluster [OPTIONS]
π¦ DESCRIPTION π¦
Set a cluster entry in kubeconfig.
And here's the lil plot twist that makes this whole thing chef's kiss: if you specify a name that already exists, it doesn't nuke it, bestie. it merges the new fields on top of the existing values for those fields. it's giving β¨collaborativeβ¨. it's giving we don't overwrite, we enhance. π
π OPTIONS π
--certificate-authority=""β Path to certificate-authority file for the cluster entry in kubeconfig--embed-certs=falseβ embed-certs for the cluster entry in kubeconfig--insecure-skip-tls-verify=falseβ insecure-skip-tls-verify for the cluster entry in kubeconfig--proxy-url=""β proxy-url for the cluster entry in kubeconfig--server=""β server for the cluster entry in kubeconfig--tls-server-name=""β tls-server-name for the cluster entry in kubeconfig
π OPTIONS INHERITED FROM PARENT COMMANDS π
these are the family heirlooms, bestie. they come down from the parent command and they are all yours to use:
--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="/home/username/.kube/cache"β Default cache directory--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 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--password=""β Password for basic authentication to the API server--profile="none"β Name of profile to capture. One of(none|cpu|heap|goroutine|threadcreate|block|mutex|trace)--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.--token=""β Bearer token for authentication to the API server--user=""β The name of the kubeconfig user to use--username=""β Username for basic authentication to the API server--version=falseβ--version,--version=rawprints version information and quits;--version=vX.Y.Z...sets the reported version--warnings-as-errors=falseβ Treat warnings received from the server as errors and exit with a non-zero exit code
no cap: that --request-timeout zero thing means no timeout at all. if it hangs, it HANGS. don't be surprised. π
π₯ EXAMPLE π₯
# Set only the server field on the e2e cluster entry without touching other values
kubectl config set-cluster e2e --server=https://1.2.3.4
# Embed certificate authority data for the e2e cluster entry
kubectl config set-cluster e2e --embed-certs --certificate-authority=~/.kube/e2e/kubernetes.ca.crt
# Disable cert checking for the e2e cluster entry
kubectl config set-cluster e2e --insecure-skip-tls-verify=true
# Set the custom TLS server name to use for validation for the e2e cluster entry
kubectl config set-cluster e2e --tls-server-name=my-cluster-name
# Set the proxy URL for the e2e cluster entry
kubectl config set-cluster e2e --proxy-url=https://1.2.3.4
π SEE ALSO π
kubectl-config(1), β go read the parent, bestie, it's the main character of this whole kubeconfig saga. π«Ά
π HISTORY π
January 2015, Originally compiled by Eric Paris (eparis at redhat dot com) based on the kubernetes source material, but hopefully they have been automatically generated since!
and that's the tea, bestie π this page is Manuals / User, KUBERNETES(1)(kubernetes), born January 2015 β and ngl, the fact that it says "hopefully they have been automatically generated since" is lowkey iconic. imagine hand-writing all these. couldn't be us. slay. β¨ππ
π¦ where this page comes from
- arch rolling: kubectl 1.37.2-1 Β· Apache-2.0
- fedora 43: kubernetes1.35-client 1.35.7-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-HP AND CC-BY-4.0 AND ISC AND MIT AND MPL-2.0
- fedora 43: kubernetes1.36-client 1.36.5-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-HP AND CC-BY-4.0 AND ISC AND MIT AND MPL-2.0
- fedora 43: kubernetes1.37-client 1.37.0-3.fc43
- fedora 43: kubernetes1.37-client 1.37.1-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-HP AND CC-BY-4.0 AND ISC AND MIT AND MPL-2.0
- fedora 44: kubernetes1.35-client 1.35.3-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-HP AND CC-BY-4.0 AND ISC AND MIT AND MPL-2.0
- fedora 44: kubernetes1.35-client 1.35.8-3.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-HP AND CC-BY-4.0 AND ISC AND MIT AND MPL-2.0
- fedora 44: kubernetes1.36-client 1.36.4-2.fc44
- fedora 44: kubernetes1.36-client 1.36.5-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-HP AND CC-BY-4.0 AND ISC AND MIT AND MPL-2.0
- fedora 44: kubernetes1.37-client 1.37.0-3.fc44
- fedora 44: kubernetes1.37-client 1.37.1-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-HP AND CC-BY-4.0 AND ISC AND MIT AND MPL-2.0
- nixos 26.05: kubectl 1.36.3
- nixpkgs unstable: kubectl 1.37.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms