OC-POLICY-REMOVE-ROLE-FROM-USER(1)

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

πŸ‘‘ 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's true, 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 to golang and jsonpath output 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 β€” if true, it keeps the managedFields when printing objects in JSON or YAML format. managedFields stans rise
  • --template="" β€” template string, or a path to a template file, that you use when -o=go-template or -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 β€” if true, you opt out of response compression for all requests to the server. raw data, no zipping, we respect it
  • --insecure-skip-tls-verify=false β€” if true, 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 the kuberc file to use for preferences. this can be disabled by exporting the KUBECTL_KUBERC=false feature gate, or by turning off the feature KUBERC=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