1KUBERNETES(1)(kubernetes) KUBERNETES(1)(kubernetes)
2
3
4
5Eric Paris Jan 2015
6
7
9 kubectl taint - Update the taints on one or more nodes
10
11
12
14 kubectl taint [OPTIONS]
15
16
17
19 Update the taints on one or more nodes.
20
21
22 • A taint consists of a key, value, and effect. As an argument
23 here, it is expressed as key=value:effect.
24
25 • The key must begin with a letter or number, and may contain
26 letters, numbers, hyphens, dots, and underscores, up to 253
27 characters.
28
29 • Optionally, the key can begin with a DNS subdomain prefix and
30 a single '/', like example.com/my-app.
31
32 • The value is optional. If given, it must begin with a letter
33 or number, and may contain letters, numbers, hyphens, dots,
34 and underscores, up to 63 characters.
35
36 • The effect must be NoSchedule, PreferNoSchedule or NoExecute.
37
38 • Currently taint can only apply to node.
39
40
41
42
44 --all=false Select all nodes in the cluster
45
46
47 --allow-missing-template-keys=true If true, ignore any errors in
48 templates when a field or map key is missing in the template. Only ap‐
49 plies to golang and jsonpath output formats.
50
51
52 --dry-run="none" Must be "none", "server", or "client". If client
53 strategy, only print the object that would be sent, without sending it.
54 If server strategy, submit server-side request without persisting the
55 resource.
56
57
58 --field-manager="kubectl-taint" Name of the manager used to track
59 field ownership.
60
61
62 -o, --output="" Output format. One of: (json, yaml, name, go-tem‐
63 plate, go-template-file, template, templatefile, jsonpath, jsonpath-as-
64 json, jsonpath-file).
65
66
67 --overwrite=false If true, allow taints to be overwritten, other‐
68 wise reject taint updates that overwrite existing taints.
69
70
71 -l, --selector="" Selector (label query) to filter on, supports
72 '=', '==', and '!='.(e.g. -l key1=value1,key2=value2). Matching objects
73 must satisfy all of the specified label constraints.
74
75
76 --show-managed-fields=false If true, keep the managedFields when
77 printing objects in JSON or YAML format.
78
79
80 --template="" Template string or path to template file to use when
81 -o=go-template, -o=go-template-file. The template format is golang tem‐
82 plates [http://golang.org/pkg/text/template/#pkg-overview].
83
84
85 --validate="strict" Must be one of: strict (or true), warn, ignore
86 (or false). "true" or "strict" will use a schema to validate
87 the input and fail the request if invalid. It will perform server side
88 validation if ServerSideFieldValidation is enabled on the api-server,
89 but will fall back to less reliable client-side validation if not.
90 "warn" will warn about unknown or duplicate fields without
91 blocking the request if server-side field validation is enabled on the
92 API server, and behave as "ignore" otherwise. "false" or
93 "ignore" will not perform any schema validation, silently dropping any
94 unknown or duplicate fields.
95
96
97
99 --as="" Username to impersonate for the operation. User could be a
100 regular user or a service account in a namespace.
101
102
103 --as-group=[] Group to impersonate for the operation, this flag
104 can be repeated to specify multiple groups.
105
106
107 --as-uid="" UID to impersonate for the operation.
108
109
110 --azure-container-registry-config="" Path to the file containing
111 Azure container registry configuration information.
112
113
114 --cache-dir="/builddir/.kube/cache" Default cache directory
115
116
117 --certificate-authority="" Path to a cert file for the certificate
118 authority
119
120
121 --client-certificate="" Path to a client certificate file for TLS
122
123
124 --client-key="" Path to a client key file for TLS
125
126
127 --cluster="" The name of the kubeconfig cluster to use
128
129
130 --context="" The name of the kubeconfig context to use
131
132
133 --insecure-skip-tls-verify=false If true, the server's certificate
134 will not be checked for validity. This will make your HTTPS connections
135 insecure
136
137
138 --kubeconfig="" Path to the kubeconfig file to use for CLI re‐
139 quests.
140
141
142 --match-server-version=false Require server version to match
143 client version
144
145
146 -n, --namespace="" If present, the namespace scope for this CLI
147 request
148
149
150 --password="" Password for basic authentication to the API server
151
152
153 --profile="none" Name of profile to capture. One of
154 (none|cpu|heap|goroutine|threadcreate|block|mutex)
155
156
157 --profile-output="profile.pprof" Name of the file to write the
158 profile to
159
160
161 --request-timeout="0" The length of time to wait before giving up
162 on a single server request. Non-zero values should contain a corre‐
163 sponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't time‐
164 out requests.
165
166
167 -s, --server="" The address and port of the Kubernetes API server
168
169
170 --tls-server-name="" Server name to use for server certificate
171 validation. If it is not provided, the hostname used to contact the
172 server is used
173
174
175 --token="" Bearer token for authentication to the API server
176
177
178 --user="" The name of the kubeconfig user to use
179
180
181 --username="" Username for basic authentication to the API server
182
183
184 --version=false Print version information and quit
185
186
187 --warnings-as-errors=false Treat warnings received from the server
188 as errors and exit with a non-zero exit code
189
190
191
193 # Update node 'foo' with a taint with key 'dedicated' and value 'special-user' and effect 'NoSchedule'
194 # If a taint with that key and effect already exists, its value is replaced as specified
195 kubectl taint nodes foo dedicated=special-user:NoSchedule
196
197 # Remove from node 'foo' the taint with key 'dedicated' and effect 'NoSchedule' if one exists
198 kubectl taint nodes foo dedicated:NoSchedule-
199
200 # Remove from node 'foo' all the taints with key 'dedicated'
201 kubectl taint nodes foo dedicated-
202
203 # Add a taint with key 'dedicated' on nodes having label mylabel=X
204 kubectl taint node -l myLabel=X dedicated=foo:PreferNoSchedule
205
206 # Add to node 'foo' a taint with key 'bar' and no value
207 kubectl taint nodes foo bar:NoSchedule
208
209
210
211
213 kubectl(1),
214
215
216
218 January 2015, Originally compiled by Eric Paris (eparis at redhat dot
219 com) based on the kubernetes source material, but hopefully they have
220 been automatically generated since!
221
222
223
224Manuals User KUBERNETES(1)(kubernetes)