OC-ADM-OCP-CERTIFICATES-REGENERATE-LEAF(1)
π oc adm ocp-certificates regenerate-leaf β the glow-up page β¨
bestie, welcome to the oc adm ocp-certificates regenerate-leaf manual β it lives in the Openshift CLI User Manuals collection and honestly? It's giving "I'm about to refresh your whole cluster's certificates" energy. No cap. π
β¨ NAME β¨
oc adm ocp-certificates regenerate-leaf β regenerates the client and serving certificates of an OpenShift cluster. That's the whole vibe. π¦
πΈ SYNOPSIS πΈ
oc adm ocp-certificates regenerate-leaf [OPTIONS]
π DESCRIPTION π
So what this does: it regenerates the leaf certificates that an OCP v4 cluster hands out. Leaf certs, not the whole dang tree. π
Real talk though β this command does not wait for the cluster to acknowledge your changes. Some of those changes can take a very long time to roll out into the cluster, and each one has different operators and operands doing the work. Basically you're ordering the cert refresh and then dipping β the cluster does the rest on its own timeline, iykyk. π
β οΈ Experimental: this command is under active development and may change without notice. Iconic of it, but likeβ¦ be aware. π
π OPTIONS π
--all=falseβ selects all resources in the namespace of the resource types you specified.-A,--all-namespaces=falseβ if present, lists the requested object(s) across all namespaces. The namespace in your current context gets straight-up ignored, even if you specified it with--namespace. rude but okay β¨--allow-missing-template-keys=trueβ when true, any errors in templates get ignored if a field or map key is missing from the template. Only applies togolangandjsonpathoutput formats. no stress π«Ά--dry-run=falseβ set it to true to use server-side dry run. practice round, no commitment π--field-selector=""β the selector (field query) to filter on. Supports=,==, and!=. Example heart:--field-selector key1=value1,key2=value2. heads up though β the server only supports a limited number of field queries per type. π-f,--filename=[]β identifying the resource.--local=falseβ if true, annotation will NOT contact api-server and runs locally instead. introvert mode π§-o,--output=""β output format. One of: (json,yaml,kyaml,name,go-template,go-template-file,template,templatefile,jsonpath,jsonpath-as-json,jsonpath-file). pick your fighter β-R,--recursive=trueβ processes the directory used in-f,--filenamerecursively. useful when you want to manage related manifests organized within the same directory. so organized of you π-l,--selector=""β selector (label query) to filter on. supports=,==, and!=. e.g.-l key1=value1,key2=value2π--show-managed-fields=falseβ if true, keeps themanagedFieldswhen printing objects in JSON or YAML format. π₯--template=""β template string or path to template file to use when-o=go-templateor-o=go-template-file. The template format is golang templates [β¨http://golang.org/pkg/text/template/#pkg-overviewβ©]. π¦--valid-before=""β only regenerates top level certificates valid before this date. Format:2023-06-05T14:44:06Z. literally the "only the old ones" filter πΈ
π§ OPTIONS INHERITED FROM PARENT COMMANDS π§
These came from the parent command and they're not optional extras, bestie β they're part of the package. π
--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="/homeless-shelter/.kube/cache"β default cache directory.--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, opts 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. π--kubeconfig=""β path to the kubeconfig file to use for CLI requests.--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. matchy matchy β¨-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"β 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. patience is a virtue ngl π§-s,--server=""β the address and port of the Kubernetes API server.--tls-server-name=""β server name to use for server certificate validation. If it is 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β treats warnings received from the server as errors and exits with a non-zero exit code. strict queen behavior π
π EXAMPLE π
okay so here's the whole thing in action β regenerating a leaf certificate that lives inside a particular secret:
# Regenerate a leaf certificate contained in a particular secret
oc adm ocp-certificates regenerate-leaf -n openshift-config-managed secret/kube-controller-manager-client-cert-key
ate. no notes. π₯
π SEE ALSO π
(yes, that trailing comma is canon, don't come for me π)
π HISTORY π
June 2016 β Ported from the Kubernetes man-doc generator. vintage, honestly. a real elder of the manpage world π
kisses and cert refreshes π β this page is brought to you by Openshift (the source) and Openshift CLI User Manuals (the vibe), dated June 2016. go forth and regenerate, bestie π«Άβ¨
π¦ 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