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

NAME

6       oc  adm  migrate image-references - Update embedded Docker image refer‐
7       ences
8
9
10

SYNOPSIS

12       oc adm migrate image-references [OPTIONS]
13
14
15

DESCRIPTION

17       Migrate references to Docker images
18
19
20       This command updates embedded Docker image references on the server  in
21       place.  By  default it will update image streams and images, and may be
22       used to update resources with a pod template (deployments,  replication
23       controllers, daemon sets).
24
25
26       References are changed by providing a mapping between a source registry
27       and name and the desired registry and name. Either name or registry can
28       be  set to ' *' to change all values. The registry value "docker.io" is
29       special and will handle any image reference that refers to the  Docker‐
30       Hub.  You  may pass multiple mappings - the first matching mapping will
31       be applied per resource.
32
33
34       The following resource types may be migrated by this command:
35
36              · buildconfigs
37
38              · daemonsets
39
40              · deploymentconfigs
41
42              · images
43
44              · imagestreams
45
46              · jobs
47
48              · pods
49
50              · replicationcontrollers
51
52              · secrets (docker)
53
54       Only images, imagestreams, and secrets are updated by default. Updating
55       images and image streams requires administrative privileges.
56
57
58

OPTIONS

60       --all-namespaces=true
61           Migrate objects in all namespaces. Defaults to true.
62
63
64       --allow-missing-template-keys=true
65           If  true, ignore any errors in templates when a field or map key is
66       missing in the template. Only applies to  golang  and  jsonpath  output
67       formats.
68
69
70       --confirm=false
71           If true, all requested objects will be migrated. Defaults to false.
72
73
74       -f, --filename=[]
75           Filename, directory, or URL to docker-compose.yml file to use
76
77
78       --from-key=""
79           If  specified,  only  migrate  items  with a key (namespace/name or
80       name) greater than or equal to this value
81
82
83       --include=[imagestream,image,secrets]
84           Resource types to migrate. Passing --filename  will  override  this
85       flag.
86
87
88       --no-headers=false
89           When  using the default or custom-column output format, don't print
90       headers (default print headers).
91
92
93       -o, --output=""
94           Output format. One of:  json|yaml|wide|name|custom-columns=...|cus‐
95       tom-columns-file=...|go-template=...|go-template-file=...|json‐
96       path=...|jsonpath-file=...  See   custom   columns   [   ⟨http://kuber
97       netes.io/docs/user-guide/kubectl-overview/#custom-columns⟩],     golang
98       template  [  ⟨http://golang.org/pkg/text/template/#pkg-overview⟩]   and
99       jsonpath template [ ⟨http://kubernetes.io/docs/user-guide/jsonpath⟩].
100
101
102       --show-labels=false
103           When  printing,  show  all  labels as the last column (default hide
104       labels column)
105
106
107       --sort-by=""
108           If non-empty, sort list types using this field specification.   The
109       field  specification  is  expressed  as  a  JSONPath  expression  (e.g.
110       '{.metadata.name}'). The field in the API resource  specified  by  this
111       JSONPath expression must be an integer or a string.
112
113
114       --template=""
115           Template  string  or  path  to template file to use when -o=go-tem‐
116       plate, -o=go-template-file. The template format is golang  templates  [
117http://golang.org/pkg/text/template/#pkg-overview⟩].
118
119
120       --to-key=""
121           If  specified,  only  migrate  items  with a key (namespace/name or
122       name) less than this value
123
124
125

OPTIONS INHERITED FROM PARENT COMMANDS

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

EXAMPLE

379                # Perform a dry-run of migrating all "docker.io" references to "myregistry.com"
380                oc adm migrate image-references docker.io/*=myregistry.com/*
381
382                # To actually perform the migration, the confirm flag must be appended
383                oc adm migrate image-references docker.io/*=myregistry.com/* --confirm
384
385                # To see more details of what will be migrated, use the loglevel and output flags
386                oc adm migrate image-references docker.io/*=myregistry.com/* --loglevel=2 -o yaml
387
388                # Migrate from a service IP to an internal service DNS name
389                oc adm migrate image-references 172.30.1.54/*=registry.openshift.svc.cluster.local/*
390
391                # Migrate from a service IP to an internal service DNS name for all deployment configs and builds
392                oc adm migrate image-references 172.30.1.54/*=registry.openshift.svc.cluster.local/* --include=buildconfigs,deploymentconfigs
393
394
395
396

SEE ALSO

398       oc-adm-migrate(1),
399
400
401

HISTORY

403       June 2016, Ported from the Kubernetes man-doc generator
404
405
406
407Openshift                  Openshift CLI User Manuals        OC ADM MIGRATE(1)
Impressum