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

NAME

6       kubectl wait - Experimental: Wait for a specific condition on one or
7       many resources.
8
9
10

SYNOPSIS

12       kubectl wait [OPTIONS]
13
14
15

DESCRIPTION

17       Experimental: Wait for a specific condition on one or many resources.
18
19
20       The command takes multiple resources and waits until the specified
21       condition is seen in the Status field of every given resource.
22
23
24       Alternatively, the command can wait for the given set of resources to
25       be deleted by providing the "delete" keyword as the value to the --for
26       flag.
27
28
29       A successful message will be printed to stdout indicating when the
30       specified condition has been met. One can use -o option to change to
31       output destination.
32
33
34

OPTIONS

36       --all=false
37           Select all resources in the namespace of the specified resource
38       types
39
40
41       -A, --all-namespaces=false
42           If present, list the requested object(s) across all namespaces.
43       Namespace in current context is ignored even if specified with
44       --namespace.
45
46
47       --allow-missing-template-keys=true
48           If true, ignore any errors in templates when a field or map key is
49       missing in the template. Only applies to golang and jsonpath output
50       formats.
51
52
53       --field-selector=""
54           Selector (field query) to filter on, supports '=', '==', and
55       '!='.(e.g. --field-selector key1=value1,key2=value2). The server only
56       supports a limited number of field queries per type.
57
58
59       -f, --filename=[]
60           identifying the resource.
61
62
63       --for=""
64           The condition to wait on: [delete|condition=condition-name].
65
66
67       --local=false
68           If true, annotation will NOT contact api-server but run locally.
69
70
71       -o, --output=""
72           Output format. One of:
73       json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-file.
74
75
76       -R, --recursive=true
77           Process the directory used in -f, --filename recursively. Useful
78       when you want to manage related manifests organized within the same
79       directory.
80
81
82       -l, --selector=""
83           Selector (label query) to filter on, supports '=', '==', and
84       '!='.(e.g. -l key1=value1,key2=value2)
85
86
87       --template=""
88           Template string or path to template file to use when
89       -o=go-template, -o=go-template-file. The template format is golang
90       templates [ ⟨http://golang.org/pkg/text/template/#pkg-overview⟩].
91
92
93       --timeout=30s
94           The length of time to wait before giving up.  Zero means check once
95       and don't wait, negative means wait for a week.
96
97
98

OPTIONS INHERITED FROM PARENT COMMANDS

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

EXAMPLE

402                # Wait for the pod "busybox1" to contain the status condition of type "Ready".
403                kubectl wait --for=condition=Ready pod/busybox1
404
405                # Wait for the pod "busybox1" to be deleted, with a timeout of 60s, after having issued the "delete" command.
406                kubectl delete pod/busybox1
407                kubectl wait --for=delete pod/busybox1 --timeout=60s
408
409
410
411

SEE ALSO

413       kubectl(1),
414
415
416

HISTORY

418       January 2015, Originally compiled by Eric Paris (eparis at redhat dot
419       com) based on the kubernetes source material, but hopefully they have
420       been automatically generated since!
421
422
423
424Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum