OC-POLICY-REMOVE-ROLE-FROM-USER(1)
π oc policy remove-role-from-user β the manual page, but make it make sense π
okay so bestie, welcome to OC POLICY(1), the OpenShift CLI user manual situation β June 2016 vintage, still iconic, still doing the most. This one's a subcommand deep-dive and honestly? Nobody explained it to you before and that's a crime. Let's go π«Ά
β¨ NAME β¨
oc policy remove-role-from-user β literally takes a role away from users for the project. That's the whole vibe. Un-assigning. De-roling. The reverse of a glow-up for permissions πΈ
β¨ SYNOPSIS β¨
oc policy remove-role-from-user [OPTIONS]
no positional args, bestie, it's all flags. all of it. every single crumb π
β¨ DESCRIPTION β¨
Remove a role from users for the project. That's it, that's the description, and ngl the original manpage said exactly this much and then peaced out π so we're gonna make up for it with thoroughness below. Every flag. Every default. Every last one. No cap.
β¨ OPTIONS β¨
--allow-missing-template-keys=trueβ if it'strue, it justβ¦ ignores any errors that pop up in templates when a field or map key is missing from the template. and like, only applies togolangandjsonpathoutput formats, so don't go thinking it's a universal get-out-of-jail card ok π--dry-run="none"β has to be"none","server", or"client". the client strategy? it just prints the object that would've been sent, without actually sending it π the server strategy? it submits the request server-side but doesn't persist the resource. fake it till you make it energy-o,--output=""β output format, and you get a whole menu: one of (json,yaml,kyaml,name,go-template,go-template-file,template,templatefile,jsonpath,jsonpath-as-json,jsonpath-file). yes all of them. pick one β¨--role-namespace=""β the namespace where the role lives. empty means a role defined in cluster policy π--rolebinding-name=""β name of the rolebinding to modify. if you leave it empty it will operate on all rolebindings, which is a lot of rolebindings, so maybe be intentional about this one π-z,--serviceaccount=[]β service account in the current namespace to use as a user π--show-managed-fields=falseβ iftrue, it keeps themanagedFieldswhen printing objects in JSON or YAML format.managedFieldsstans rise--template=""β template string, or a path to a template file, that you use when-o=go-templateor-o=go-template-file. the template format is golang templates [ β¨http://golang.org/pkg/text/template/#pkg-overviewβ© ] π¦
β¨ OPTIONS INHERITED FROM PARENT COMMANDS β¨
these are the ones you didn't ask for but you got anyway, because inheritance is real and so is oc being a whole ecosystem π
--as=""β username to impersonate for the operation. 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, so go off--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. that path is not a typo, that's genuinely what it says π--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, you opt out of response compression for all requests to the server. raw data, no zipping, we respect it--insecure-skip-tls-verify=falseβ iftrue, the server's certificate will not be checked for validity, and this will make your HTTPS connections insecure. ok so like, lowkey a bad idea, read that again π¨--kubeconfig=""β path to the kubeconfig file to use for CLI requests--kuberc=""β path to thekubercfile to use for preferences. this can be disabled by exporting theKUBECTL_KUBERC=falsefeature gate, or by turning off the featureKUBERC=off.--match-server-version=falseβ require server version to match client version. strict queen behavior-n,--namespace=""β if present, the namespace scope for this CLI request πΈ--profile="none"β name of the 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, which is bold of you π«Ά-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. chaotic, but valid π
β¨ SEE ALSO β¨
oc-policy(1)β the parent, the origin story, the main character β¨
β¨ HISTORY β¨
June 2016, Ported from the Kubernetes man-doc generator. a classic. a relic. we love her for it π
ngl bestie, if you're about to run this against all rolebindings because you left --rolebinding-name empty, maybe take a lil breath first. we support informed decisions π
and that's the page!! brought to you by Openshift, the Openshift CLI User Manuals, dated June 2016 β mwah, ily, go remove some roles responsibly ππ¦π
π¦ 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