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
31       deployment from being replaced by a  triggered  deployment  soon  after
32       your 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
37       deployment  configuration  instead  of  executing the rollback. This is
38       useful 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|template|go-template|go-tem‐
69       plate-file|templatefile|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
163       already 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
215       applied 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       --httptest.serve=""
227           if non-empty, httptest.NewServer serves on this address and blocks
228
229
230       --insecure-skip-tls-verify=false
231           If true, the server's certificate will not be checked for validity.
232       This will make your HTTPS connections insecure
233
234
235       --kubeconfig=""
236           Path to the kubeconfig file to use for CLI requests.
237
238
239       --log-flush-frequency=0
240           Maximum number of seconds between log flushes
241
242
243       --log_backtrace_at=:0
244           when logging hits line file:N, emit a stack trace
245
246
247       --log_cadvisor_usage=false
248           Whether to log the usage of the cAdvisor container
249
250
251       --log_dir=""
252           If non-empty, write log files in this directory
253
254
255       --logtostderr=true
256           log to standard error instead of files
257
258
259       --machine_id_file="/etc/machine-id,/var/lib/dbus/machine-id"
260           Comma-separated  list  of  files  to  check for machine-id. Use the
261       first one that exists.
262
263
264       --match-server-version=false
265           Require server version to match client version
266
267
268       -n, --namespace=""
269           If present, the namespace scope for this CLI request
270
271
272       --request-timeout="0"
273           The length of time to wait before giving  up  on  a  single  server
274       request. Non-zero values should contain a corresponding time unit (e.g.
275       1s, 2m, 3h). A value of zero means don't timeout requests.
276
277
278       -s, --server=""
279           The address and port of the Kubernetes API server
280
281
282       --stderrthreshold=2
283           logs at or above this threshold go to stderr
284
285
286       --storage_driver_buffer_duration=0
287           Writes in the storage driver will be buffered  for  this  duration,
288       and committed to the non memory backends as a single transaction
289
290
291       --storage_driver_db="cadvisor"
292           database name
293
294
295       --storage_driver_host="localhost:8086"
296           database host:port
297
298
299       --storage_driver_password="root"
300           database password
301
302
303       --storage_driver_secure=false
304           use secure connection with database
305
306
307       --storage_driver_table="stats"
308           table name
309
310
311       --storage_driver_user="root"
312           database username
313
314
315       --token=""
316           Bearer token for authentication to the API server
317
318
319       --user=""
320           The name of the kubeconfig user to use
321
322
323       -v, --v=0
324           log level for V logs
325
326
327       --version=false
328           Print version information and quit
329
330
331       --vmodule=
332           comma-separated  list  of pattern=N settings for file-filtered log‐
333       ging
334
335
336

EXAMPLE

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

SEE ALSO

357       oc(1),
358
359
360

HISTORY

362       June 2016, Ported from the Kubernetes man-doc generator
363
364
365
366Openshift                  Openshift CLI User Manuals                    OC(1)
Impressum