KUBERNETES(1) kubernetes KUBERNETES(1) (NAME) kubectl-set-subject - role binding cluster role binding (SYNOPSIS) kubectl set subject [OPTIONS] (DESCRIPTION) (service account) role binding cluster role binding. (OPTIONS) --all=false namespace --allow-missing-template-keys=true true (map key) . golang jsonpath . --dry-run="none" "none" "server" "client" . client . server . --field-manager="kubectl-set" . -f, --filename=[] URL subject --group=[] (bind) (role) -k, --kustomize="" kustomization. -f -R . --local=false true set subject api-server . -o, --output="" . : (json, yaml, kyaml, name, go-template, go-template- file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath- file). -R, --recursive=false -f --filename. . -l, --selector="" ( ) '=', '==', '!=', 'in', 'notin' ( -l key1=value1,key2=value2,key3 in (value3)). . --serviceaccount=[] (service accounts) --show-managed-fields=false true managedFields JSON YAML . --template="" -o=go-template -o=go-template-file. golang [http://golang.org/pkg/text/template/#pkg-overview]. --user=[] (OPTIONS INHERITED FROM PARENT COMMANDS) --as="" (impersonate) . (service account) namespace . --as-group=[] . --as-uid="" UID . --as-user-extra=[] . --cache-dir="/home/username/.kube/cache" --certificate-authority="" (certificate authority) --client-certificate="" TLS --client-key="" TLS --cluster="" kubeconfig --context="" kubeconfig --disable-compression=false true --insecure-skip-tls-verify=false true . HTTPS --kubeconfig="" kubeconfig CLI. --kuberc="" kuberc (preferences). export feature gate KUBECTL_KUBERC=false KUBERC=off . --match-server-version=false -n, --namespace="" namespace CLI --password="" (basic authentication) API --profile="none" . (none|cpu|heap|goroutine|threadcreate|block|mutex|trace) --profile-output="profile.pprof" --request-timeout="0" . ( 1s 2m 3h). ( timeout). -s, --server="" Kubernetes API --tls-server-name="" . hostname --token="" Bearer API --username="" API --version=false --version --version=raw --version=vX.Y.Z... --warnings-as-errors=false (EXAMPLES) # cluster role binding serviceaccount1 kubectl set subject clusterrolebinding admin --serviceaccount=namespace:serviceaccount1 # role binding user1 user2 group1 kubectl set subject rolebinding admin --user=user1 --user=user2 --group=group1 # ( YAML) subject rolebinding kubectl create rolebinding admin --role=admin --user=admin -o yaml --dry-run=client | kubectl set subject --local -f - --user=foo -o yaml (SEE ALSO) kubectl-set(1), (HISTORY) Eric Paris (eparis at redhat dot com) kubernetes ! Eric Paris Jan 2015 KUBERNETES(1)