1OC(1)                              June 2016                             OC(1)
2
3
4

NAME

6       oc  rollback - Revert part of an application back to a previous deploy‐
7       ment
8
9
10

SYNOPSIS

12       oc rollback [OPTIONS]
13
14
15

DESCRIPTION

17       Revert an application back to a previous deployment
18
19
20       When you run this command your deployment configuration will be updated
21       to  match  a previous deployment. By default only the pod and container
22       configuration will be changed and scaling or trigger settings  will  be
23       left  as-  is. Note that environment variables and volumes are included
24       in rollbacks, so if you've recently  updated  security  credentials  in
25       your environment your previous deployment may not have the correct val‐
26       ues.
27
28
29       Any image triggers present in the rolled  back  configuration  will  be
30       disabled  with  a warning. This is to help prevent your rolled back de‐
31       ployment from being replaced by a triggered deployment soon after  your
32       rollback. To re-enable the triggers, use the 'deploy' command.
33
34
35       If  you  would  like  to  review  the  outcome  of  the  rollback, pass
36       '--dry-run' to print a human-readable representation of the updated de‐
37       ployment  configuration instead of executing the rollback. This is use‐
38       ful if you're not quite sure what the outcome will be.
39
40
41

OPTIONS

43       --allow-missing-template-keys=true
44           If true, ignore any errors in templates when a field or map key  is
45       missing  in  the  template.  Only applies to golang and jsonpath output
46       formats.
47
48
49       --change-scaling-settings=false
50           If true, include the  previous  deployment's  replicationController
51       replica count and selector in the rollback
52
53
54       --change-strategy=false
55           If true, include the previous deployment's strategy in the rollback
56
57
58       --change-triggers=false
59           If true, include the previous deployment's triggers in the rollback
60
61
62       -d, --dry-run=false
63           Instead of performing the rollback, describe what the rollback will
64       look like in human-readable form
65
66
67       -o, --output=""
68           Output format. One of: json|yaml|name|templatefile|template|go-tem‐
69       plate|go-template-file|jsonpath|jsonpath-file.
70
71
72       --template=""
73           Template  string  or  path  to template file to use when -o=go-tem‐
74       plate, -o=go-template-file. The template format is golang  templates  [
75http://golang.org/pkg/text/template/#pkg-overview⟩].
76
77
78       --to-version=0
79           A  config  version to rollback to. Specifying version 0 is the same
80       as omitting a version (the version will be auto-detected). This  option
81       is ignored when specifying a deployment.
82
83
84

OPTIONS INHERITED FROM PARENT COMMANDS

86       --allow_verification_with_non_compliant_keys=false
87           Allow  a  SignatureVerifier  to  use  keys  which  are  technically
88       non-compliant with RFC6962.
89
90
91       --alsologtostderr=false
92           log to standard error as well as files
93
94
95       --application_metrics_count_limit=100
96           Max number of application metrics to store (per container)
97
98
99       --as=""
100           Username to impersonate for the operation
101
102
103       --as-group=[]
104           Group to impersonate for the operation, this flag can  be  repeated
105       to specify multiple groups.
106
107
108       --azure-container-registry-config=""
109           Path  to the file containing Azure container registry configuration
110       information.
111
112
113       --boot_id_file="/proc/sys/kernel/random/boot_id"
114           Comma-separated list of files to check for boot-id. Use  the  first
115       one that exists.
116
117
118       --cache-dir="/builddir/.kube/http-cache"
119           Default HTTP cache directory
120
121
122       --certificate-authority=""
123           Path to a cert file for the certificate authority
124
125
126       --client-certificate=""
127           Path to a client certificate file for TLS
128
129
130       --client-key=""
131           Path to a client key file for TLS
132
133
134       --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
135           CIDRs opened in GCE firewall for LB traffic proxy  health checks
136
137
138       --cluster=""
139           The name of the kubeconfig cluster to use
140
141
142       --container_hints="/etc/cadvisor/container_hints.json"
143           location of the container hints file
144
145
146       --containerd="unix:///var/run/containerd.sock"
147           containerd endpoint
148
149
150       --context=""
151           The name of the kubeconfig context to use
152
153
154       --default-not-ready-toleration-seconds=300
155           Indicates   the   tolerationSeconds   of   the    toleration    for
156       notReady:NoExecute  that is added by default to every pod that does not
157       already have such a toleration.
158
159
160       --default-unreachable-toleration-seconds=300
161           Indicates the tolerationSeconds  of  the  toleration  for  unreach‐
162       able:NoExecute  that is added by default to every pod that does not al‐
163       ready have such a toleration.
164
165
166       --docker="unix:///var/run/docker.sock"
167           docker endpoint
168
169
170       --docker-tls=false
171           use TLS to connect to docker
172
173
174       --docker-tls-ca="ca.pem"
175           path to trusted CA
176
177
178       --docker-tls-cert="cert.pem"
179           path to client certificate
180
181
182       --docker-tls-key="key.pem"
183           path to private key
184
185
186       --docker_env_metadata_whitelist=""
187           a comma-separated list of environment variable keys that  needs  to
188       be collected for docker containers
189
190
191       --docker_only=false
192           Only report docker containers in addition to root stats
193
194
195       --docker_root="/var/lib/docker"
196           DEPRECATED:  docker  root is read from docker info (this is a fall‐
197       back, default: /var/lib/docker)
198
199
200       --enable_load_reader=false
201           Whether to enable cpu load reader
202
203
204       --event_storage_age_limit="default=24h"
205           Max length of time for which to store events (per type). Value is a
206       comma  separated  list  of  key  values, where the keys are event types
207       (e.g.: creation, oom) or "default" and the value is a duration. Default
208       is applied to all non-specified event types
209
210
211       --event_storage_event_limit="default=100000"
212           Max  number  of  events to store (per type). Value is a comma sepa‐
213       rated list of key values, where the keys are event  types  (e.g.:  cre‐
214       ation,  oom)  or  "default" and the value is an integer. Default is ap‐
215       plied to all non-specified event types
216
217
218       --global_housekeeping_interval=0
219           Interval between global housekeepings
220
221
222       --housekeeping_interval=0
223           Interval between container housekeepings
224
225
226       --insecure-skip-tls-verify=false
227           If true, the server's certificate will not be checked for validity.
228       This will make your HTTPS connections insecure
229
230
231       --kubeconfig=""
232           Path to the kubeconfig file to use for CLI requests.
233
234
235       --log-flush-frequency=0
236           Maximum number of seconds between log flushes
237
238
239       --log_backtrace_at=:0
240           when logging hits line file:N, emit a stack trace
241
242
243       --log_cadvisor_usage=false
244           Whether to log the usage of the cAdvisor container
245
246
247       --log_dir=""
248           If non-empty, write log files in this directory
249
250
251       --logtostderr=true
252           log to standard error instead of files
253
254
255       --machine_id_file="/etc/machine-id,/var/lib/dbus/machine-id"
256           Comma-separated  list  of  files  to  check for machine-id. Use the
257       first one that exists.
258
259
260       --match-server-version=false
261           Require server version to match client version
262
263
264       -n, --namespace=""
265           If present, the namespace scope for this CLI request
266
267
268       --request-timeout="0"
269           The length of time to wait before giving up on a single server  re‐
270       quest.  Non-zero  values should contain a corresponding time unit (e.g.
271       1s, 2m, 3h). A value of zero means don't timeout requests.
272
273
274       -s, --server=""
275           The address and port of the Kubernetes API server
276
277
278       --stderrthreshold=2
279           logs at or above this threshold go to stderr
280
281
282       --storage_driver_buffer_duration=0
283           Writes in the storage driver will be buffered  for  this  duration,
284       and committed to the non memory backends as a single transaction
285
286
287       --storage_driver_db="cadvisor"
288           database name
289
290
291       --storage_driver_host="localhost:8086"
292           database host:port
293
294
295       --storage_driver_password="root"
296           database password
297
298
299       --storage_driver_secure=false
300           use secure connection with database
301
302
303       --storage_driver_table="stats"
304           table name
305
306
307       --storage_driver_user="root"
308           database username
309
310
311       --token=""
312           Bearer token for authentication to the API server
313
314
315       --user=""
316           The name of the kubeconfig user to use
317
318
319       -v, --v=0
320           log level for V logs
321
322
323       --version=false
324           Print version information and quit
325
326
327       --vmodule=
328           comma-separated  list  of pattern=N settings for file-filtered log‐
329       ging
330
331
332

EXAMPLE

334                # Perform a rollback to the last successfully completed deployment for a deploymentconfig
335                oc rollback frontend
336
337                # See what a rollback to version 3 will look like, but don't perform the rollback
338                oc rollback frontend --to-version=3 --dry-run
339
340                # Perform a rollback to a specific deployment
341                oc rollback frontend-2
342
343                # Perform the rollback manually by piping the JSON of the new config back to oc
344                oc rollback frontend -o json | oc replace dc/frontend -f -
345
346                # Print the updated deployment configuration in JSON format instead of performing the rollback
347                oc rollback frontend -o json
348
349
350
351

SEE ALSO

353       oc(1),
354
355
356

HISTORY

358       June 2016, Ported from the Kubernetes man-doc generator
359
360
361
362Openshift                  Openshift CLI User Manuals                    OC(1)
Impressum