KUBERNETES(1)(kubernetes)

<h1>πŸ‘‘ kubernetes(1) β€” the manual, but make it cute πŸ’…</h1>

okay so bestie, welcome to the kubernetes(1) corner of the manual world 🌈 today's main character is kubectl create rolebinding, and fr fr she's iconic. This page has been vibing in the manual since Jan 2015, originally compiled by Eric Paris (iykyk). Grab a strawberry πŸ“, we're going in.


✨ NAME ✨

kubectl create rolebinding β€” create a role binding for a particular role or cluster role πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

kubectl create rolebinding [OPTIONS]

πŸ’– DESCRIPTION πŸ’–

Not me making a RoleBinding for you πŸ’… Basically: this command creates a role binding that points at a particular role or a cluster role. That's the whole vibe. No cap.


🌸 OPTIONS 🌸

so many flags, and every single one of them ate:

  • --allow-missing-template-keys=true β€” if it's true, template errors get ignored when a field or map key is missing from the template. Only applies to golang and jsonpath output formats, okay? don't come for her otherwise.
  • --clusterrole="" β€” the ClusterRole this RoleBinding should reference.
  • --dry-run="none" β€” must be "none", "server", or "client". If it's the client strategy, she only prints the object that would be sent, without actually sending it πŸ‘€. If it's the server strategy, she submits a server-side request without persisting the resource.
  • --field-manager="kubectl-create" β€” the name of the manager used to track field ownership.
  • --group=[] β€” groups to bind to the role. Repeat the flag to add multiple groups, periodt πŸ’…
  • -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 ✨
  • --role="" β€” the Role this RoleBinding should reference.
  • --save-config=false β€” if true, the configuration of the current object gets saved in its annotation; otherwise the annotation stays exactly as it was. This one's highkey useful when you want to run kubectl apply on this object later 🫢
  • --serviceaccount=[] β€” service accounts to bind to the role, in the format :. Repeat the flag to add multiple service accounts.
  • --show-managed-fields=false β€” if true, keep the managedFields when printing objects in JSON or YAML format.
  • --template="" β€” template string, or a path to a template file, to use when -o=go-template or -o=go-template-file. The template format is golang templates: http://golang.org/pkg/text/template/#pkg-overview 🧚
  • --user=[] β€” usernames to bind to the role. Repeat the flag to add multiple users, obviously πŸ’–
  • --validate="strict" β€” must be one of: strict (or true), warn, ignore (or false). "true" or "strict" uses a schema to validate the input and fails the request if it's invalid β€” it'll do server side validation if ServerSideFieldValidation is enabled on the api-server, but falls back to less reliable client-side validation if it's not 😭. "warn" warns about unknown or duplicate fields without blocking the request if server-side field validation is on, and behaves like "ignore" otherwise. "false" or "ignore" does no schema validation at all and silently drops any unknown or duplicate fields πŸ’€.

πŸŽ€ OPTIONS INHERITED FROM PARENT COMMANDS πŸŽ€

these ones came from the parent commands, they're family 🫢:

  • --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; repeat this flag to specify multiple groups.
  • --as-uid="" β€” UID to impersonate for the operation.
  • --as-user-extra=[] β€” user extras to impersonate for the operation; repeat this flag to specify multiple values for the same key.
  • --cache-dir="/home/username/.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, 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, bestie, be so serious right now.
  • --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 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.
  • --password="" β€” password for basic authentication to the API server.
  • --profile="none" β€” name of profile to capture, one of none, cpu, heap, goroutine, threadcreate, block, mutex, trace.
  • --profile-output="profile.pprof" β€” name of the file to write the profile to.
  • --proxy-url="" β€” proxy URL to use for requests to the API server.
  • --request-timeout="0" β€” how long to wait before giving up on a single server request. Non-zero values should include a time unit (like 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.
  • --username="" β€” username for basic authentication to the API server.
  • --version=false β€” --version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version.
  • --warnings-as-errors=false β€” treat warnings received from the server as errors and exit with a non-zero exit code.

🌈 EXAMPLE 🌈

look at her go, she's serving:

# Create a role binding for user1, user2, and group1 using the admin cluster role
kubectl create rolebinding admin --clusterrole=admin --user=user1 --user=user2 --group=group1

# Create a role binding for service account monitoring:sa-dev using the admin role
kubectl create rolebinding admin-binding --role=admin --serviceaccount=monitoring:sa-dev

πŸ‘‘ SEE ALSO πŸ‘‘


πŸ“œ HISTORY πŸ“œ

January 2015, originally compiled by Eric Paris (eparis at redhat dot com) based on the kubernetes source material, but hopefully they have been automatically generated since! πŸ’€ iconic origin story honestly.


and that's the whole page, bestie. go forth and bind those roles πŸ’…

Manuals Β· User Β· KUBERNETES(1)(kubernetes) β€” mwah, that's the footer, love you, bye πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from