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       --disable-compression=false      If true, opt-out of response  compres‐
136       sion for all requests to the server
137
138
139       --insecure-skip-tls-verify=false      If true, the server's certificate
140       will not be checked for validity. This will make your HTTPS connections
141       insecure
142
143
144       --kubeconfig=""       Path  to  the  kubeconfig file to use for CLI re‐
145       quests.
146
147
148       --match-server-version=false       Require  server  version  to   match
149       client version
150
151
152       -n,  --namespace=""       If  present, the namespace scope for this CLI
153       request
154
155
156       --password=""      Password for basic authentication to the API server
157
158
159       --profile="none"        Name   of   profile   to   capture.   One    of
160       (none|cpu|heap|goroutine|threadcreate|block|mutex)
161
162
163       --profile-output="profile.pprof"       Name  of  the  file to write the
164       profile to
165
166
167       --request-timeout="0"      The length of time to wait before giving  up
168       on  a  single  server  request. Non-zero values should contain a corre‐
169       sponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't time‐
170       out requests.
171
172
173       -s, --server=""      The address and port of the Kubernetes API server
174
175
176       --tls-server-name=""       Server  name  to  use for server certificate
177       validation. If it is not provided, the hostname  used  to  contact  the
178       server is used
179
180
181       --token=""      Bearer token for authentication to the API server
182
183
184       --user=""      The name of the kubeconfig user to use
185
186
187       --username=""      Username for basic authentication to the API server
188
189
190       --version=false      Print version information and quit
191
192
193       --warnings-as-errors=false      Treat warnings received from the server
194       as errors and exit with a non-zero exit code
195
196
197

EXAMPLE

199                # Wait for the pod "busybox1" to contain the status condition of type "Ready"
200                kubectl wait --for=condition=Ready pod/busybox1
201
202                # 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):
203                kubectl wait --for=condition=Ready=false pod/busybox1
204
205                # Wait for the pod "busybox1" to contain the status phase to be "Running".
206                kubectl wait --for=jsonpath='{.status.phase}'=Running pod/busybox1
207
208                # Wait for the pod "busybox1" to be deleted, with a timeout of 60s, after having issued the "delete" command
209                kubectl delete pod/busybox1
210                kubectl wait --for=delete pod/busybox1 --timeout=60s
211
212
213
214

SEE ALSO

216       kubectl(1),
217
218
219

HISTORY

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