1KUBERNETES(1) Jan 2015 KUBERNETES(1)
2
3
4
6 kubectl rolling-update - Perform a rolling update. This command is dep‐
7 recated, use rollout instead.
8
9
10
12 kubectl rolling-update [OPTIONS]
13
14
15
17 Perform a rolling update of the given ReplicationController.
18
19
20 Replaces the specified replication controller with a new replication
21 controller by updating one pod at a time to use the new PodTemplate.
22 The new-controller.json must specify the same namespace as the existing
23 replication controller and overwrite at least one (common) label in its
24 replicaSelector.
25
26
27 ! ⟨http://kubernetes.io/images/docs/kubectl_rollingupdate.svg⟩
28
29
30
32 --allow-missing-template-keys=true
33 If true, ignore any errors in templates when a field or map key is
34 missing in the template. Only applies to golang and jsonpath output
35 formats.
36
37
38 --container=""
39 Container name which will have its image upgraded. Only relevant
40 when --image is specified, ignored otherwise. Required when using
41 --image on a multi-container pod
42
43
44 --deployment-label-key="deployment"
45 The key to use to differentiate between two different controllers,
46 default 'deployment'. Only relevant when --image is specified, ignored
47 otherwise
48
49
50 --dry-run=false
51 If true, only print the object that would be sent, without sending
52 it.
53
54
55 -f, --filename=[]
56 Filename or URL to file to use to create the new replication con‐
57 troller.
58
59
60 --image=""
61 Image to use for upgrading the replication controller. Must be dis‐
62 tinct from the existing image (either new image or new image tag). Can
63 not be used with --filename/-f
64
65
66 --image-pull-policy=""
67 Explicit policy for when to pull container images. Required when
68 --image is same as existing image, ignored otherwise.
69
70
71 -o, --output=""
72 Output format. One of: json|yaml|name|go-template|go-tem‐
73 plate-file|template|templatefile|jsonpath|jsonpath-file.
74
75
76 --poll-interval=3s
77 Time delay between polling for replication controller status after
78 the update. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m",
79 "h".
80
81
82 --rollback=false
83 If true, this is a request to abort an existing rollout that is
84 partially rolled out. It effectively reverses current and next and runs
85 a rollout
86
87
88 --template=""
89 Template string or path to template file to use when -o=go-tem‐
90 plate, -o=go-template-file. The template format is golang templates [
91 ⟨http://golang.org/pkg/text/template/#pkg-overview⟩].
92
93
94 --timeout=5m0s
95 Max time to wait for a replication controller to update before giv‐
96 ing up. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
97
98
99 --update-period=1m0s
100 Time to wait between updating pods. Valid time units are "ns", "us"
101 (or "µs"), "ms", "s", "m", "h".
102
103
104 --validate=true
105 If true, use a schema to validate the input before sending it
106
107
108
110 --alsologtostderr=false
111 log to standard error as well as files
112
113
114 --application-metrics-count-limit=100
115 Max number of application metrics to store (per container)
116
117
118 --as=""
119 Username to impersonate for the operation
120
121
122 --as-group=[]
123 Group to impersonate for the operation, this flag can be repeated
124 to specify multiple groups.
125
126
127 --azure-container-registry-config=""
128 Path to the file containing Azure container registry configuration
129 information.
130
131
132 --boot-id-file="/proc/sys/kernel/random/boot_id"
133 Comma-separated list of files to check for boot-id. Use the first
134 one that exists.
135
136
137 --cache-dir="/builddir/.kube/http-cache"
138 Default HTTP cache directory
139
140
141 --certificate-authority=""
142 Path to a cert file for the certificate authority
143
144
145 --client-certificate=""
146 Path to a client certificate file for TLS
147
148
149 --client-key=""
150 Path to a client key file for TLS
151
152
153 --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
154 CIDRs opened in GCE firewall for LB traffic proxy health checks
155
156
157 --cluster=""
158 The name of the kubeconfig cluster to use
159
160
161 --container-hints="/etc/cadvisor/container_hints.json"
162 location of the container hints file
163
164
165 --containerd="unix:///var/run/containerd.sock"
166 containerd endpoint
167
168
169 --context=""
170 The name of the kubeconfig context to use
171
172
173 --default-not-ready-toleration-seconds=300
174 Indicates the tolerationSeconds of the toleration for
175 notReady:NoExecute that is added by default to every pod that does not
176 already have such a toleration.
177
178
179 --default-unreachable-toleration-seconds=300
180 Indicates the tolerationSeconds of the toleration for unreach‐
181 able:NoExecute that is added by default to every pod that does not
182 already have such a toleration.
183
184
185 --docker="unix:///var/run/docker.sock"
186 docker endpoint
187
188
189 --docker-env-metadata-whitelist=""
190 a comma-separated list of environment variable keys that needs to
191 be collected for docker containers
192
193
194 --docker-only=false
195 Only report docker containers in addition to root stats
196
197
198 --docker-root="/var/lib/docker"
199 DEPRECATED: docker root is read from docker info (this is a fall‐
200 back, default: /var/lib/docker)
201
202
203 --docker-tls=false
204 use TLS to connect to docker
205
206
207 --docker-tls-ca="ca.pem"
208 path to trusted CA
209
210
211 --docker-tls-cert="cert.pem"
212 path to client certificate
213
214
215 --docker-tls-key="key.pem"
216 path to private key
217
218
219 --enable-load-reader=false
220 Whether to enable cpu load reader
221
222
223 --event-storage-age-limit="default=0"
224 Max length of time for which to store events (per type). Value is a
225 comma separated list of key values, where the keys are event types
226 (e.g.: creation, oom) or "default" and the value is a duration. Default
227 is applied to all non-specified event types
228
229
230 --event-storage-event-limit="default=0"
231 Max number of events to store (per type). Value is a comma sepa‐
232 rated list of key values, where the keys are event types (e.g.: cre‐
233 ation, oom) or "default" and the value is an integer. Default is
234 applied to all non-specified event types
235
236
237 --global-housekeeping-interval=1m0s
238 Interval between global housekeepings
239
240
241 --housekeeping-interval=10s
242 Interval between container housekeepings
243
244
245 --insecure-skip-tls-verify=false
246 If true, the server's certificate will not be checked for validity.
247 This will make your HTTPS connections insecure
248
249
250 --kubeconfig=""
251 Path to the kubeconfig file to use for CLI requests.
252
253
254 --log-backtrace-at=:0
255 when logging hits line file:N, emit a stack trace
256
257
258 --log-cadvisor-usage=false
259 Whether to log the usage of the cAdvisor container
260
261
262 --log-dir=""
263 If non-empty, write log files in this directory
264
265
266 --log-file=""
267 If non-empty, use this log file
268
269
270 --log-flush-frequency=5s
271 Maximum number of seconds between log flushes
272
273
274 --logtostderr=true
275 log to standard error instead of files
276
277
278 --machine-id-file="/etc/machine-id,/var/lib/dbus/machine-id"
279 Comma-separated list of files to check for machine-id. Use the
280 first one that exists.
281
282
283 --match-server-version=false
284 Require server version to match client version
285
286
287 --mesos-agent="127.0.0.1:5051"
288 Mesos agent address
289
290
291 --mesos-agent-timeout=10s
292 Mesos agent timeout
293
294
295 -n, --namespace=""
296 If present, the namespace scope for this CLI request
297
298
299 --password=""
300 Password for basic authentication to the API server
301
302
303 --profile="none"
304 Name of profile to capture. One of (none|cpu|heap|goroutine|thread‐
305 create|block|mutex)
306
307
308 --profile-output="profile.pprof"
309 Name of the file to write the profile to
310
311
312 --request-timeout="0"
313 The length of time to wait before giving up on a single server
314 request. Non-zero values should contain a corresponding time unit (e.g.
315 1s, 2m, 3h). A value of zero means don't timeout requests.
316
317
318 -s, --server=""
319 The address and port of the Kubernetes API server
320
321
322 --skip-headers=false
323 If true, avoid header prefixes in the log messages
324
325
326 --stderrthreshold=2
327 logs at or above this threshold go to stderr
328
329
330 --storage-driver-buffer-duration=1m0s
331 Writes in the storage driver will be buffered for this duration,
332 and committed to the non memory backends as a single transaction
333
334
335 --storage-driver-db="cadvisor"
336 database name
337
338
339 --storage-driver-host="localhost:8086"
340 database host:port
341
342
343 --storage-driver-password="root"
344 database password
345
346
347 --storage-driver-secure=false
348 use secure connection with database
349
350
351 --storage-driver-table="stats"
352 table name
353
354
355 --storage-driver-user="root"
356 database username
357
358
359 --token=""
360 Bearer token for authentication to the API server
361
362
363 --user=""
364 The name of the kubeconfig user to use
365
366
367 --username=""
368 Username for basic authentication to the API server
369
370
371 -v, --v=0
372 log level for V logs
373
374
375 --version=false
376 Print version information and quit
377
378
379 --vmodule=
380 comma-separated list of pattern=N settings for file-filtered log‐
381 ging
382
383
384
386 # Update pods of frontend-v1 using new replication controller data in frontend-v2.json.
387 kubectl rolling-update frontend-v1 -f frontend-v2.json
388
389 # Update pods of frontend-v1 using JSON data passed into stdin.
390 cat frontend-v2.json | kubectl rolling-update frontend-v1 -f -
391
392 # Update the pods of frontend-v1 to frontend-v2 by just changing the image, and switching the
393 # name of the replication controller.
394 kubectl rolling-update frontend-v1 frontend-v2 --image=image:v2
395
396 # Update the pods of frontend by just changing the image, and keeping the old name.
397 kubectl rolling-update frontend --image=image:v2
398
399 # Abort and reverse an existing rollout in progress (from frontend-v1 to frontend-v2).
400 kubectl rolling-update frontend-v1 frontend-v2 --rollback
401
402
403
404
406 kubectl(1),
407
408
409
411 January 2015, Originally compiled by Eric Paris (eparis at redhat dot
412 com) based on the kubernetes source material, but hopefully they have
413 been automatically generated since!
414
415
416
417Eric Paris kubernetes User Manuals KUBERNETES(1)