OC-CONFIG-NEW-ADMIN-KUBECONFIG(1)

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

πŸ’… 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 β€” 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. ⚠️ 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 the KUBECTL_KUBERC=false feature gate, or by turning off the feature with 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" β€” 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