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

NAME

6       kubectl taint - Update the taints on one or more nodes
7
8
9

SYNOPSIS

11       kubectl taint [OPTIONS]
12
13
14

DESCRIPTION

16       Update the taints on one or more nodes.
17
18
19              · A taint consists of a key, value, and effect. As an argument
20                here, it is expressed as key=value:effect.
21
22              · The key must begin with a letter or number, and may contain
23                letters, numbers, hyphens, dots, and underscores, up to  253
24                characters.
25
26              · Optionally, the key can begin with a DNS subdomain prefix and
27                a single '/', like example.com/my-app
28
29              · The value is optional. If given, it must begin with a letter
30                or number, and may contain letters, numbers, hyphens, dots,
31                and underscores, up to  63 characters.
32
33              · The effect must be NoSchedule, PreferNoSchedule or NoExecute.
34
35              · Currently taint can only apply to node.
36
37
38
39

OPTIONS

41       --all=false
42           Select all nodes in the cluster
43
44
45       --allow-missing-template-keys=true
46           If true, ignore any errors in templates when a field or map key is
47       missing in the template. Only applies to golang and jsonpath output
48       formats.
49
50
51       --dry-run="none"
52           Must be "none", "server", or "client". If client strategy, only
53       print the object that would be sent, without sending it. If server
54       strategy, submit server-side request without persisting the resource.
55
56
57       -o, --output=""
58           Output format. One of:
59       json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.
60
61
62       --overwrite=false
63           If true, allow taints to be overwritten, otherwise reject taint
64       updates that overwrite existing taints.
65
66
67       -l, --selector=""
68           Selector (label query) to filter on, supports '=', '==', and
69       '!='.(e.g. -l key1=value1,key2=value2)
70
71
72       --template=""
73           Template string or path to template file to use when
74       -o=go-template, -o=go-template-file. The template format is golang
75       templates [ ⟨http://golang.org/pkg/text/template/#pkg-overview⟩].
76
77
78       --validate=true
79           If true, use a schema to validate the input before sending it
80
81
82

OPTIONS INHERITED FROM PARENT COMMANDS

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

EXAMPLE

386                # Update node 'foo' with a taint with key 'dedicated' and value 'special-user' and effect 'NoSchedule'.
387                # If a taint with that key and effect already exists, its value is replaced as specified.
388                kubectl taint nodes foo dedicated=special-user:NoSchedule
389
390                # Remove from node 'foo' the taint with key 'dedicated' and effect 'NoSchedule' if one exists.
391                kubectl taint nodes foo dedicated:NoSchedule-
392
393                # Remove from node 'foo' all the taints with key 'dedicated'
394                kubectl taint nodes foo dedicated-
395
396                # Add a taint with key 'dedicated' on nodes having label mylabel=X
397                kubectl taint node -l myLabel=X  dedicated=foo:PreferNoSchedule
398
399                # Add to node 'foo' a taint with key 'bar' and no value
400                kubectl taint nodes foo bar:NoSchedule
401
402
403
404

SEE ALSO

406       kubectl(1),
407
408
409

HISTORY

411       January 2015, Originally compiled by Eric Paris (eparis at redhat dot
412       com) based on the kubernetes source material, but hopefully they have
413       been automatically generated since!
414
415
416
417Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum