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="/run/containerd/containerd.sock"
166 containerd endpoint
167
168
169 --containerd-namespace="k8s.io"
170 containerd namespace
171
172
173 --context=""
174 The name of the kubeconfig context to use
175
176
177 --default-not-ready-toleration-seconds=300
178 Indicates the tolerationSeconds of the toleration for
179 notReady:NoExecute that is added by default to every pod that does not
180 already have such a toleration.
181
182
183 --default-unreachable-toleration-seconds=300
184 Indicates the tolerationSeconds of the toleration for unreach‐
185 able:NoExecute that is added by default to every pod that does not
186 already have such a toleration.
187
188
189 --docker="unix:///var/run/docker.sock"
190 docker endpoint
191
192
193 --docker-env-metadata-whitelist=""
194 a comma-separated list of environment variable keys that needs to
195 be collected for docker containers
196
197
198 --docker-only=false
199 Only report docker containers in addition to root stats
200
201
202 --docker-root="/var/lib/docker"
203 DEPRECATED: docker root is read from docker info (this is a fall‐
204 back, default: /var/lib/docker)
205
206
207 --docker-tls=false
208 use TLS to connect to docker
209
210
211 --docker-tls-ca="ca.pem"
212 path to trusted CA
213
214
215 --docker-tls-cert="cert.pem"
216 path to client certificate
217
218
219 --docker-tls-key="key.pem"
220 path to private key
221
222
223 --enable-load-reader=false
224 Whether to enable cpu load reader
225
226
227 --event-storage-age-limit="default=0"
228 Max length of time for which to store events (per type). Value is a
229 comma separated list of key values, where the keys are event types
230 (e.g.: creation, oom) or "default" and the value is a duration. Default
231 is applied to all non-specified event types
232
233
234 --event-storage-event-limit="default=0"
235 Max number of events to store (per type). Value is a comma sepa‐
236 rated list of key values, where the keys are event types (e.g.: cre‐
237 ation, oom) or "default" and the value is an integer. Default is
238 applied to all non-specified event types
239
240
241 --global-housekeeping-interval=1m0s
242 Interval between global housekeepings
243
244
245 --housekeeping-interval=10s
246 Interval between container housekeepings
247
248
249 --insecure-skip-tls-verify=false
250 If true, the server's certificate will not be checked for validity.
251 This will make your HTTPS connections insecure
252
253
254 --kubeconfig=""
255 Path to the kubeconfig file to use for CLI requests.
256
257
258 --log-backtrace-at=:0
259 when logging hits line file:N, emit a stack trace
260
261
262 --log-cadvisor-usage=false
263 Whether to log the usage of the cAdvisor container
264
265
266 --log-dir=""
267 If non-empty, write log files in this directory
268
269
270 --log-file=""
271 If non-empty, use this log file
272
273
274 --log-file-max-size=1800
275 Defines the maximum size a log file can grow to. Unit is megabytes.
276 If the value is 0, the maximum file size is unlimited.
277
278
279 --log-flush-frequency=5s
280 Maximum number of seconds between log flushes
281
282
283 --logtostderr=true
284 log to standard error instead of files
285
286
287 --machine-id-file="/etc/machine-id,/var/lib/dbus/machine-id"
288 Comma-separated list of files to check for machine-id. Use the
289 first one that exists.
290
291
292 --match-server-version=false
293 Require server version to match client version
294
295
296 -n, --namespace=""
297 If present, the namespace scope for this CLI request
298
299
300 --password=""
301 Password for basic authentication to the API server
302
303
304 --profile="none"
305 Name of profile to capture. One of (none|cpu|heap|goroutine|thread‐
306 create|block|mutex)
307
308
309 --profile-output="profile.pprof"
310 Name of the file to write the profile to
311
312
313 --request-timeout="0"
314 The length of time to wait before giving up on a single server
315 request. Non-zero values should contain a corresponding time unit (e.g.
316 1s, 2m, 3h). A value of zero means don't timeout requests.
317
318
319 -s, --server=""
320 The address and port of the Kubernetes API server
321
322
323 --skip-headers=false
324 If true, avoid header prefixes in the log messages
325
326
327 --skip-log-headers=false
328 If true, avoid headers when opening log files
329
330
331 --stderrthreshold=2
332 logs at or above this threshold go to stderr
333
334
335 --storage-driver-buffer-duration=1m0s
336 Writes in the storage driver will be buffered for this duration,
337 and committed to the non memory backends as a single transaction
338
339
340 --storage-driver-db="cadvisor"
341 database name
342
343
344 --storage-driver-host="localhost:8086"
345 database host:port
346
347
348 --storage-driver-password="root"
349 database password
350
351
352 --storage-driver-secure=false
353 use secure connection with database
354
355
356 --storage-driver-table="stats"
357 table name
358
359
360 --storage-driver-user="root"
361 database username
362
363
364 --token=""
365 Bearer token for authentication to the API server
366
367
368 --update-machine-info-interval=5m0s
369 Interval between machine info updates.
370
371
372 --user=""
373 The name of the kubeconfig user to use
374
375
376 --username=""
377 Username for basic authentication to the API server
378
379
380 -v, --v=0
381 number for the log level verbosity
382
383
384 --version=false
385 Print version information and quit
386
387
388 --vmodule=
389 comma-separated list of pattern=N settings for file-filtered log‐
390 ging
391
392
393
395 # Update pods of frontend-v1 using new replication controller data in frontend-v2.json.
396 kubectl rolling-update frontend-v1 -f frontend-v2.json
397
398 # Update pods of frontend-v1 using JSON data passed into stdin.
399 cat frontend-v2.json | kubectl rolling-update frontend-v1 -f -
400
401 # Update the pods of frontend-v1 to frontend-v2 by just changing the image, and switching the
402 # name of the replication controller.
403 kubectl rolling-update frontend-v1 frontend-v2 --image=image:v2
404
405 # Update the pods of frontend by just changing the image, and keeping the old name.
406 kubectl rolling-update frontend --image=image:v2
407
408 # Abort and reverse an existing rollout in progress (from frontend-v1 to frontend-v2).
409 kubectl rolling-update frontend-v1 frontend-v2 --rollback
410
411
412
413
415 kubectl(1),
416
417
418
420 January 2015, Originally compiled by Eric Paris (eparis at redhat dot
421 com) based on the kubernetes source material, but hopefully they have
422 been automatically generated since!
423
424
425
426Eric Paris kubernetes User Manuals KUBERNETES(1)