1KUBERNETES(1)(kubernetes)                            KUBERNETES(1)(kubernetes)
2
3
4
5Eric Paris Jan 2015
6
7

NAME

9       kubectl  wait  -  Experimental: Wait for a specific condition on one or
10       many resources
11
12
13

SYNOPSIS

15       kubectl wait [OPTIONS]
16
17
18

DESCRIPTION

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

OPTIONS

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

OPTIONS INHERITED FROM PARENT COMMANDS

101       --as=""      Username to impersonate for the operation. User could be a
102       regular user or a service account in a namespace.
103
104
105       --as-group=[]       Group  to  impersonate for the operation, this flag
106       can be repeated to specify multiple groups.
107
108
109       --as-uid=""      UID to impersonate for the operation.
110
111
112       --azure-container-registry-config=""      Path to the  file  containing
113       Azure container registry configuration information.
114
115
116       --cache-dir="/builddir/.kube/cache"      Default cache directory
117
118
119       --certificate-authority=""      Path to a cert file for the certificate
120       authority
121
122
123       --client-certificate=""      Path to a client certificate file for TLS
124
125
126       --client-key=""      Path to a client key file for TLS
127
128
129       --cluster=""      The name of the kubeconfig cluster to use
130
131
132       --context=""      The name of the kubeconfig context to use
133
134
135       --insecure-skip-tls-verify=false      If true, the server's certificate
136       will not be checked for validity. This will make your HTTPS connections
137       insecure
138
139
140       --kubeconfig=""      Path to the kubeconfig file to  use  for  CLI  re‐
141       quests.
142
143
144       --match-server-version=false        Require  server  version  to  match
145       client version
146
147
148       -n, --namespace=""      If present, the namespace scope  for  this  CLI
149       request
150
151
152       --password=""      Password for basic authentication to the API server
153
154
155       --profile="none"         Name   of   profile   to   capture.   One   of
156       (none|cpu|heap|goroutine|threadcreate|block|mutex)
157
158
159       --profile-output="profile.pprof"      Name of the  file  to  write  the
160       profile to
161
162
163       --request-timeout="0"       The length of time to wait before giving up
164       on a single server request. Non-zero values  should  contain  a  corre‐
165       sponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't time‐
166       out requests.
167
168
169       -s, --server=""      The address and port of the Kubernetes API server
170
171
172       --tls-server-name=""      Server name to  use  for  server  certificate
173       validation.  If  it  is  not provided, the hostname used to contact the
174       server is used
175
176
177       --token=""      Bearer token for authentication to the API server
178
179
180       --user=""      The name of the kubeconfig user to use
181
182
183       --username=""      Username for basic authentication to the API server
184
185
186       --version=false      Print version information and quit
187
188
189       --warnings-as-errors=false      Treat warnings received from the server
190       as errors and exit with a non-zero exit code
191
192
193

EXAMPLE

195                # Wait for the pod "busybox1" to contain the status condition of type "Ready"
196                kubectl wait --for=condition=Ready pod/busybox1
197
198                # The default value of status condition is true; you can wait for other targets after an equal delimiter (compared after Unicode simple case folding, which is a more general form of case-insensitivity):
199                kubectl wait --for=condition=Ready=false pod/busybox1
200
201                # Wait for the pod "busybox1" to contain the status phase to be "Running".
202                kubectl wait --for=jsonpath='{.status.phase}'=Running pod/busybox1
203
204                # Wait for the pod "busybox1" to be deleted, with a timeout of 60s, after having issued the "delete" command
205                kubectl delete pod/busybox1
206                kubectl wait --for=delete pod/busybox1 --timeout=60s
207
208
209
210

SEE ALSO

212       kubectl(1),
213
214
215

HISTORY

217       January  2015,  Originally compiled by Eric Paris (eparis at redhat dot
218       com) based on the kubernetes source material, but hopefully  they  have
219       been automatically generated since!
220
221
222
223Manuals                              User            KUBERNETES(1)(kubernetes)
Impressum