OC-CONFIG-NEW-ADMIN-KUBECONFIG(1)
π OC-CONFIG-NEW-ADMIN-KUBECONFIG(1) π
okay bestie, welcome to the oc config corner of the OpenShift CLI User Manuals β¨ (yes, that's the whole manual, she's fancy). This page is literally all about new-admin-kubeconfig, and June 2016 is when this whole thing got ported, so she's got lore π
πΈ NAME πΈ
oc config new-admin-kubeconfig β generate a brand-new admin.kubeconfig, make the server actually trust it, and then show it off to you. three steps, one command, main character energy π
π¦ SYNOPSIS π¦
oc config new-admin-kubeconfig [OPTIONS]
β¨ DESCRIPTION β¨
So here's the vibe: this command generates a new admin.kubeconfig, gets the server to trust it, and displays it. All three. In one go. Iconic behavior, honestly.
The key gets produced locally and is not persisted to disk β nope, she's ephemeral, she lives in the moment π«. The public half gets pushed up to the cluster so kube-apiserver will trust the admin kubeconfig you just made locally. No cap, that's the whole magic trick πͺ
π OPTIONS INHERITED FROM PARENT COMMANDS π
These aren't even hers, she's just borrowing them from her parent command and they're all still very much in play:
--as=""β username to impersonate for the operation. could be a regular user OR a service account in a namespace, both are valid π--as-group=[]β group to impersonate for the operation. repeat this flag as many times as you want to specify multiple groups π«Ά--as-uid=""β UID to impersonate for the operation--as-user-extra=[]β user extras to impersonate for the operation. repeat it to specify multiple values for the same key π--cache-dir="/homeless-shelter/.kube/cache"β default cache directory (yes, that's literally the path, don't @ me)--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β iftrue, opt out of response compression for all requests to the server--insecure-skip-tls-verify=falseβ iftrue, the server's certificate will not be checked for validity. β οΈ heads up bestie, this will make your HTTPS connections insecure β like, actually insecure β so maybe don't π--kubeconfig=""β use a particular kubeconfig file--kuberc=""β path to the kuberc file to use for preferences. you can disable this by exporting theKUBECTL_KUBERC=falsefeature gate, or by turning off the feature withKUBERC=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"β how long 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'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 π¨
π EXAMPLE π
# Generate a new admin kubeconfig
oc config new-admin-kubeconfig
π SEE ALSO π
β HISTORY β
- June 2016 β Ported from the Kubernetes man-doc generator π«‘
aaaand that's the whole page, bestie, you ate that ππ signing off β this was Openshift CLI User Manuals, dated June 2016, and the manual name's got that Openshift energy all over it πΈ see you in the next one, mwah π
π¦ 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