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 con‐
21       dition 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 --names‐
44       pace.
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       -o, --output=""
68           Output   format.   One    of:    json|yaml|name|go-template|go-tem‐
69       plate-file|template|templatefile|jsonpath|jsonpath-file.
70
71
72       -R, --recursive=true
73           Process  the  directory  used in -f, --filename recursively. Useful
74       when you want to manage related manifests  organized  within  the  same
75       directory.
76
77
78       -l, --selector=""
79           Selector  (label  query)  to  filter  on,  supports  '=', '==', and
80       '!='.(e.g. -l key1=value1,key2=value2)
81
82
83       --template=""
84           Template string or path to template file  to  use  when  -o=go-tem‐
85       plate,  -o=go-template-file.  The template format is golang templates [
86http://golang.org/pkg/text/template/#pkg-overview⟩].
87
88
89       --timeout=30s
90           The length of time to wait before giving up.  Zero means check once
91       and don't wait, negative means wait for a week.
92
93
94

OPTIONS INHERITED FROM PARENT COMMANDS

96       --alsologtostderr=false
97           log to standard error as well as files
98
99
100       --application-metrics-count-limit=100
101           Max number of application metrics to store (per container)
102
103
104       --as=""
105           Username to impersonate for the operation
106
107
108       --as-group=[]
109           Group  to  impersonate for the operation, this flag can be repeated
110       to specify multiple groups.
111
112
113       --azure-container-registry-config=""
114           Path to the file containing Azure container registry  configuration
115       information.
116
117
118       --boot-id-file="/proc/sys/kernel/random/boot_id"
119           Comma-separated  list  of files to check for boot-id. Use the first
120       one that exists.
121
122
123       --cache-dir="/builddir/.kube/http-cache"
124           Default HTTP cache directory
125
126
127       --certificate-authority=""
128           Path to a cert file for the certificate authority
129
130
131       --client-certificate=""
132           Path to a client certificate file for TLS
133
134
135       --client-key=""
136           Path to a client key file for TLS
137
138
139       --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
140           CIDRs opened in GCE firewall for LB traffic proxy  health checks
141
142
143       --cluster=""
144           The name of the kubeconfig cluster to use
145
146
147       --container-hints="/etc/cadvisor/container_hints.json"
148           location of the container hints file
149
150
151       --containerd="/run/containerd/containerd.sock"
152           containerd endpoint
153
154
155       --containerd-namespace="k8s.io"
156           containerd namespace
157
158
159       --context=""
160           The name of the kubeconfig context to use
161
162
163       --default-not-ready-toleration-seconds=300
164           Indicates    the    tolerationSeconds   of   the   toleration   for
165       notReady:NoExecute that is added by default to every pod that does  not
166       already have such a toleration.
167
168
169       --default-unreachable-toleration-seconds=300
170           Indicates  the  tolerationSeconds  of  the  toleration for unreach‐
171       able:NoExecute that is added by default to  every  pod  that  does  not
172       already have such a toleration.
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  fall‐
190       back, 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  sepa‐
222       rated  list  of  key values, where the keys are event types (e.g.: cre‐
223       ation, 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 (none|cpu|heap|goroutine|thread‐
292       create|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       --token=""
351           Bearer token for authentication to the API server
352
353
354       --update-machine-info-interval=5m0s
355           Interval between machine info updates.
356
357
358       --user=""
359           The name of the kubeconfig user to use
360
361
362       --username=""
363           Username for basic authentication to the API server
364
365
366       -v, --v=0
367           number for the log level verbosity
368
369
370       --version=false
371           Print version information and quit
372
373
374       --vmodule=
375           comma-separated list of pattern=N settings for  file-filtered  log‐
376       ging
377
378
379

EXAMPLE

381                # Wait for the pod "busybox1" to contain the status condition of type "Ready".
382                kubectl wait --for=condition=Ready pod/busybox1
383
384                # Wait for the pod "busybox1" to be deleted, with a timeout of 60s, after having issued the "delete" command.
385                kubectl delete pod/busybox1
386                kubectl wait --for=delete pod/busybox1 --timeout=60s
387
388
389
390

SEE ALSO

392       kubectl(1),
393
394
395

HISTORY

397       January  2015,  Originally compiled by Eric Paris (eparis at redhat dot
398       com) based on the kubernetes source material, but hopefully  they  have
399       been automatically generated since!
400
401
402
403Eric Paris                  kubernetes User Manuals              KUBERNETES(1)
Impressum