OC-AUTH-RECONCILE(1)
π oc auth reconcile β the RBAC glow-up page π
ok so this is the oc auth reconcile page from the oc auth manual (that's the OpenShift CLI user manual family, bestie β same crew) β¨
πΈ NAME πΈ
oc auth reconcile β reconciles the rules for RBAC role, role binding, cluster role, and cluster role binding objects. yes, all four. she does it all. π
π¦ SYNOPSIS π¦
oc auth reconcile [OPTIONS]
that's it. that's the whole vibe check. no positional args, just flags and confidence. π
π DESCRIPTION π
okay so picture this: you've got RBAC role objects, role binding objects, cluster role objects, and cluster role binding objects, and their rules are a mess. oc auth reconcile is the friend who comes over and organises your entire closet. literally. π
Here's the tea, point by point, no cap:
- Missing objects get created. If it's not there, she makes it. and for namespaced objects, the containing namespace gets created too β but only if required, like she's not out here making namespaces for fun. π
- Existing roles get updated to include the permissions from the input objects. and they remove extra permissions if
--remove-extra-permissionsis specified. only if. she's not deleting your stuff unprompted, that would be rude. - Existing bindings get updated to include the subjects in the input objects. and they remove extra subjects if
--remove-extra-subjectsis specified. same energy. same boundaries. π
And the main character note: this is preferred to apply for RBAC resources, because it does semantically-aware merging of rules and subjects. it gets the semantics. it's not just slapping YAML together and hoping. π₯
β¨ OPTIONS β¨
--allow-missing-template-keys=trueβ if true, ignore any errors in templates when a field or map key is missing in the template. only applies togolangandjsonpathoutput formats, so don't come for her about the other formats, she doesn't do that. π--dry-run="none"β must be"none","server", or"client". no other options, bestie, that's the list. if client strategy, only print the object that would be sent, without sending it (a little window-shopping moment ποΈ). if server strategy, submit the server-side request without persisting the resource. like a rehearsal. iconic.-f,--filename=[]β filename, directory, or URL to files identifying the resource to reconcile. feed her the files, she'll handle it. π-k,--kustomize=""β process the kustomization directory. this flag can't be used together with-for-R. pick a lane, gorgeous. π«-o,--output=""β output format. one of:(json, yaml, kyaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). that's the whole menu, order off it. π-R,--recursive=falseβ process the directory used in-f,--filenamerecursively. useful when you want to manage related manifests organized within the same directory. go deeper. she's not scared of a subfolder. π--remove-extra-permissions=falseβ if true, removes extra permissions added to roles. yes, that's the whole thing. it says what it does and it does what it says. π§Ή--remove-extra-subjects=falseβ if true, removes extra subjects added to rolebindings. same deal, one word different, don't mix them up (iykyk). π«Ά--show-managed-fields=falseβ if true, keep themanagedFieldswhen printing objects in JSON or YAML format. it's giving transparency. π--template=""β template string or path to template file to use when-o=go-template,-o=go-template-file. the template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. here's the link, she's not gatekeeping. π
π OPTIONS INHERITED FROM PARENT COMMANDS π
these aren't hers, they're from the parent command β she just inherited them, like a really good skincare routine. π
--as=""β username to impersonate for the operation. user could be a regular user or a service account in a namespace. be someone else for a second, it's fine. π--as-group=[]β group to impersonate for the operation. this flag can be repeated to specify multiple groups. stack 'em. π§--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 path. it's literally that. π--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. pick your universe. π--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. β οΈ this will make your HTTPS connections insecure. like, genuinely. she said it, not me. be careful, bestie. π--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. no mismatches allowed, it's giving perfectionism. π-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). entire list, right there. π--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. zero = infinite patience. she'll wait. β³-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β treat warnings received from the server as errors and exit with a non-zero exit code. harsh? maybe. effective? absolutely. π
π₯ EXAMPLE π₯
ok here's the moment you've been waiting for, the actual demo:
# Reconcile RBAC resources from a file
oc auth reconcile -f my-rbac-rules.yaml
that's it. one line. she ate. π½οΈβ¨
π SEE ALSO π
oc-auth(1)β the parent page, go say hi π
π¦ HISTORY π¦
June 2016, Ported from the Kubernetes man-doc generator. vintage. retro. still slaying. π
lowkey reminder: this page is part of the Openshift docs, from the Openshift CLI User Manuals, and the version stamp on this one is June 2016 (both up top and down at the bottom, matching, as she should). ngl the source line and the date are the whole footer vibe β consider this the cute sign-off: go reconcile those RBAC rules, bestie, and remember to --dry-run first if you're feeling cautious. 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