1KUBERNETES(1)                      Jan 2015                      KUBERNETES(1)
2
3
4

NAME

6       kubectl  set  subject  -  Update  User,  Group  or  ServiceAccount in a
7       RoleBinding/ClusterRoleBinding
8
9
10

SYNOPSIS

12       kubectl set subject [OPTIONS]
13
14
15

DESCRIPTION

17       Update User, Group or ServiceAccount in a  RoleBinding/ClusterRoleBind‐
18       ing.
19
20
21

OPTIONS

23       --all=false
24           Select  all  resources, including uninitialized ones, in the names‐
25       pace of the specified resource types
26
27
28       --allow-missing-template-keys=true
29           If true, ignore any errors in templates when a field or map key  is
30       missing  in  the  template.  Only applies to golang and jsonpath output
31       formats.
32
33
34       --dry-run=false
35           If true, only print the object that would be sent, without  sending
36       it.
37
38
39       -f, --filename=[]
40           Filename,  directory,  or  URL  to files the resource to update the
41       subjects
42
43
44       --group=[]
45           Groups to bind to the role
46
47
48       --include-uninitialized=false
49           If true, the kubectl command applies to uninitialized  objects.  If
50       explicitly  set to false, this flag overrides other flags that make the
51       kubectl commands apply to uninitialized objects, e.g., "--all". Objects
52       with empty metadata.initializers are regarded as initialized.
53
54
55       --local=false
56           If true, set subject will NOT contact api-server but run locally.
57
58
59       -o, --output=""
60           Output    format.    One   of:   json|yaml|name|go-template|go-tem‐
61       plate-file|template|templatefile|jsonpath|jsonpath-file.
62
63
64       -R, --recursive=false
65           Process the directory used in -f,  --filename  recursively.  Useful
66       when  you  want  to  manage related manifests organized within the same
67       directory.
68
69
70       -l, --selector=""
71           Selector (label query) to filter on,  not  including  uninitialized
72       ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
73
74
75       --serviceaccount=[]
76           Service accounts to bind to the role
77
78
79       --template=""
80           Template  string  or  path  to template file to use when -o=go-tem‐
81       plate, -o=go-template-file. The template format is golang  templates  [
82http://golang.org/pkg/text/template/#pkg-overview⟩].
83
84
85

OPTIONS INHERITED FROM PARENT COMMANDS

87       --alsologtostderr=false
88           log to standard error as well as files
89
90
91       --application-metrics-count-limit=100
92           Max number of application metrics to store (per container)
93
94
95       --as=""
96           Username to impersonate for the operation
97
98
99       --as-group=[]
100           Group  to  impersonate for the operation, this flag can be repeated
101       to specify multiple groups.
102
103
104       --azure-container-registry-config=""
105           Path to the file containing Azure container registry  configuration
106       information.
107
108
109       --boot-id-file="/proc/sys/kernel/random/boot_id"
110           Comma-separated  list  of files to check for boot-id. Use the first
111       one that exists.
112
113
114       --cache-dir="/builddir/.kube/http-cache"
115           Default HTTP cache directory
116
117
118       --certificate-authority=""
119           Path to a cert file for the certificate authority
120
121
122       --client-certificate=""
123           Path to a client certificate file for TLS
124
125
126       --client-key=""
127           Path to a client key file for TLS
128
129
130       --cloud-provider-gce-lb-src-cidrs=130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
131           CIDRs opened in GCE firewall for LB traffic proxy  health checks
132
133
134       --cluster=""
135           The name of the kubeconfig cluster to use
136
137
138       --container-hints="/etc/cadvisor/container_hints.json"
139           location of the container hints file
140
141
142       --containerd="unix:///var/run/containerd.sock"
143           containerd endpoint
144
145
146       --context=""
147           The name of the kubeconfig context to use
148
149
150       --default-not-ready-toleration-seconds=300
151           Indicates    the    tolerationSeconds   of   the   toleration   for
152       notReady:NoExecute that is added by default to every pod that does  not
153       already have such a toleration.
154
155
156       --default-unreachable-toleration-seconds=300
157           Indicates  the  tolerationSeconds  of  the  toleration for unreach‐
158       able:NoExecute that is added by default to  every  pod  that  does  not
159       already have such a toleration.
160
161
162       --docker="unix:///var/run/docker.sock"
163           docker endpoint
164
165
166       --docker-env-metadata-whitelist=""
167           a  comma-separated  list of environment variable keys that needs to
168       be collected for docker containers
169
170
171       --docker-only=false
172           Only report docker containers in addition to root stats
173
174
175       --docker-root="/var/lib/docker"
176           DEPRECATED: docker root is read from docker info (this is  a  fall‐
177       back, default: /var/lib/docker)
178
179
180       --docker-tls=false
181           use TLS to connect to docker
182
183
184       --docker-tls-ca="ca.pem"
185           path to trusted CA
186
187
188       --docker-tls-cert="cert.pem"
189           path to client certificate
190
191
192       --docker-tls-key="key.pem"
193           path to private key
194
195
196       --enable-load-reader=false
197           Whether to enable cpu load reader
198
199
200       --event-storage-age-limit="default=0"
201           Max length of time for which to store events (per type). Value is a
202       comma separated list of key values, where  the  keys  are  event  types
203       (e.g.: creation, oom) or "default" and the value is a duration. Default
204       is applied to all non-specified event types
205
206
207       --event-storage-event-limit="default=0"
208           Max number of events to store (per type). Value is  a  comma  sepa‐
209       rated  list  of  key values, where the keys are event types (e.g.: cre‐
210       ation, oom) or "default" and  the  value  is  an  integer.  Default  is
211       applied to all non-specified event types
212
213
214       --global-housekeeping-interval=1m0s
215           Interval between global housekeepings
216
217
218       --housekeeping-interval=10s
219           Interval between container housekeepings
220
221
222       --insecure-skip-tls-verify=false
223           If true, the server's certificate will not be checked for validity.
224       This will make your HTTPS connections insecure
225
226
227       --kubeconfig=""
228           Path to the kubeconfig file to use for CLI requests.
229
230
231       --log-backtrace-at=:0
232           when logging hits line file:N, emit a stack trace
233
234
235       --log-cadvisor-usage=false
236           Whether to log the usage of the cAdvisor container
237
238
239       --log-dir=""
240           If non-empty, write log files in this directory
241
242
243       --log-file=""
244           If non-empty, use this log file
245
246
247       --log-flush-frequency=5s
248           Maximum number of seconds between log flushes
249
250
251       --logtostderr=true
252           log to standard error instead of files
253
254
255       --machine-id-file="/etc/machine-id,/var/lib/dbus/machine-id"
256           Comma-separated list of files to  check  for  machine-id.  Use  the
257       first one that exists.
258
259
260       --match-server-version=false
261           Require server version to match client version
262
263
264       --mesos-agent="127.0.0.1:5051"
265           Mesos agent address
266
267
268       --mesos-agent-timeout=10s
269           Mesos agent timeout
270
271
272       -n, --namespace=""
273           If present, the namespace scope for this CLI request
274
275
276       --password=""
277           Password for basic authentication to the API server
278
279
280       --profile="none"
281           Name of profile to capture. One of (none|cpu|heap|goroutine|thread‐
282       create|block|mutex)
283
284
285       --profile-output="profile.pprof"
286           Name of the file to write the profile to
287
288
289       --request-timeout="0"
290           The length of time to wait before giving  up  on  a  single  server
291       request. Non-zero values should contain a corresponding time unit (e.g.
292       1s, 2m, 3h). A value of zero means don't timeout requests.
293
294
295       -s, --server=""
296           The address and port of the Kubernetes API server
297
298
299       --skip-headers=false
300           If true, avoid header prefixes in the log messages
301
302
303       --stderrthreshold=2
304           logs at or above this threshold go to stderr
305
306
307       --storage-driver-buffer-duration=1m0s
308           Writes in the storage driver will be buffered  for  this  duration,
309       and committed to the non memory backends as a single transaction
310
311
312       --storage-driver-db="cadvisor"
313           database name
314
315
316       --storage-driver-host="localhost:8086"
317           database host:port
318
319
320       --storage-driver-password="root"
321           database password
322
323
324       --storage-driver-secure=false
325           use secure connection with database
326
327
328       --storage-driver-table="stats"
329           table name
330
331
332       --storage-driver-user="root"
333           database username
334
335
336       --token=""
337           Bearer token for authentication to the API server
338
339
340       --user=""
341           The name of the kubeconfig user to use
342
343
344       --username=""
345           Username for basic authentication to the API server
346
347
348       -v, --v=0
349           log level for V logs
350
351
352       --version=false
353           Print version information and quit
354
355
356       --vmodule=
357           comma-separated  list  of pattern=N settings for file-filtered log‐
358       ging
359
360
361

EXAMPLE

363                # Update a ClusterRoleBinding for serviceaccount1
364                kubectl set subject clusterrolebinding admin --serviceaccount=namespace:serviceaccount1
365
366                # Update a RoleBinding for user1, user2, and group1
367                kubectl set subject rolebinding admin --user=user1 --user=user2 --group=group1
368
369                # Print the result (in yaml format) of updating rolebinding subjects from a local, without hitting the server
370                kubectl create rolebinding admin --role=admin --user=admin -o yaml --dry-run | kubectl set subject --local -f - --user=foo -o yaml
371
372
373
374

SEE ALSO

376       kubectl-set(1),
377
378
379

HISTORY

381       January 2015, Originally compiled by Eric Paris (eparis at  redhat  dot
382       com)  based  on the kubernetes source material, but hopefully they have
383       been automatically generated since!
384
385
386
387Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum