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 --disable-compression=false If true, opt-out of response compres‐
134 sion for all requests to the server
135
136
137 --insecure-skip-tls-verify=false If true, the server's certificate
138 will not be checked for validity. This will make your HTTPS connections
139 insecure
140
141
142 --kubeconfig="" Path to the kubeconfig file to use for CLI re‐
143 quests.
144
145
146 --match-server-version=false Require server version to match
147 client version
148
149
150 -n, --namespace="" If present, the namespace scope for this CLI
151 request
152
153
154 --password="" Password for basic authentication to the API server
155
156
157 --profile="none" Name of profile to capture. One of
158 (none|cpu|heap|goroutine|threadcreate|block|mutex)
159
160
161 --profile-output="profile.pprof" Name of the file to write the
162 profile to
163
164
165 --request-timeout="0" The length of time to wait before giving up
166 on a single server request. Non-zero values should contain a corre‐
167 sponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't time‐
168 out requests.
169
170
171 -s, --server="" The address and port of the Kubernetes API server
172
173
174 --tls-server-name="" Server name to use for server certificate
175 validation. If it is not provided, the hostname used to contact the
176 server is used
177
178
179 --token="" Bearer token for authentication to the API server
180
181
182 --user="" The name of the kubeconfig user to use
183
184
185 --username="" Username for basic authentication to the API server
186
187
188 --version=false Print version information and quit
189
190
191 --warnings-as-errors=false Treat warnings received from the server
192 as errors and exit with a non-zero exit code
193
194
195
197 # Update node 'foo' with a taint with key 'dedicated' and value 'special-user' and effect 'NoSchedule'
198 # If a taint with that key and effect already exists, its value is replaced as specified
199 kubectl taint nodes foo dedicated=special-user:NoSchedule
200
201 # Remove from node 'foo' the taint with key 'dedicated' and effect 'NoSchedule' if one exists
202 kubectl taint nodes foo dedicated:NoSchedule-
203
204 # Remove from node 'foo' all the taints with key 'dedicated'
205 kubectl taint nodes foo dedicated-
206
207 # Add a taint with key 'dedicated' on nodes having label mylabel=X
208 kubectl taint node -l myLabel=X dedicated=foo:PreferNoSchedule
209
210 # Add to node 'foo' a taint with key 'bar' and no value
211 kubectl taint nodes foo bar:NoSchedule
212
213
214
215
217 kubectl(1),
218
219
220
222 January 2015, Originally compiled by Eric Paris (eparis at redhat dot
223 com) based on the kubernetes source material, but hopefully they have
224 been automatically generated since!
225
226
227
228Manuals User KUBERNETES(1)(kubernetes)