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'strue, template errors get ignored when a field or map key is missing from the template. Only applies togolangandjsonpathoutput 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β iftrue, 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 runkubectl applyon 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β iftrue, keep themanagedFieldswhen printing objects in JSON or YAML format.--template=""β template string, or a path to a 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π§--user=[]β usernames to bind to the role. Repeat the flag to add multiple users, obviously π--validate="strict"β must be one of:strict(ortrue),warn,ignore(orfalse)."true"or"strict"uses a schema to validate the input and fails the request if it's invalid β it'll do server side validation ifServerSideFieldValidationis 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β iftrue, opt out of response compression for all requests to the server.--insecure-skip-tls-verify=falseβ iftrue, 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 theKUBECTL_KUBERC=falsefeature gate, or by turning off the feature withKUBERC=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 ofnone,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 (like1s,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=rawprints 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
- arch rolling: kubectl 1.37.2-1 Β· Apache-2.0
- fedora 43: kubernetes1.37-client 1.37.0-3.fc43
- fedora 43: kubernetes1.37-client 1.37.1-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-HP AND CC-BY-4.0 AND ISC AND MIT AND MPL-2.0
- fedora 44: kubernetes1.37-client 1.37.0-3.fc44
- fedora 44: kubernetes1.37-client 1.37.1-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-3-Clause-HP AND CC-BY-4.0 AND ISC AND MIT AND MPL-2.0
- nixpkgs unstable: kubectl 1.37.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms