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

NAME

6       oc  set  image-lookup  -  Change how images are resolved when deploying
7       applications
8
9
10

SYNOPSIS

12       oc set image-lookup [OPTIONS]
13
14
15

DESCRIPTION

17       Use an image stream from pods and other objects
18
19
20       Image streams make it easy to tag images, track changes from other reg‐
21       istries,  and  centralize  access  control to images. Local name lookup
22       allows an image stream to be the source of  images  for  pods,  deploy‐
23       ments, replica sets, and other resources that reference images, without
24       having to provide the full  registry  URL.  If  local  name  lookup  is
25       enabled for an image stream named 'mysql', a pod or other resource that
26       references 'mysql:latest' (or any other tag) will pull from  the  loca‐
27       tion specified by the image stream tag, not from an upstream registry.
28
29
30       Once  lookup  is  enabled, simply reference the image stream tag in the
31       image field of the object. For example:
32
33
34                $ oc import-image mysql:latest --confirm
35                $ oc set image-lookup mysql
36                $ oc run mysql --image=mysql
37
38
39
40       will import the latest MySQL image from the DockerHub, set  that  image
41       stream to handle the "mysql" name within the project, and then launch a
42       deployment that points to the image we imported.
43
44
45       You may also force image lookup for all of the  images  on  a  resource
46       with  this  command. An annotation is placed on the object which forces
47       an image stream tag lookup in the current namespace for any image  that
48       matches, regardless of whether the image stream has lookup enabled.
49
50
51                $ oc run mysql --image=myregistry:5000/test/mysql:v1
52                $ oc tag --source=docker myregistry:5000/test/mysql:v1 mysql:v1
53                $ oc set image-lookup deploy/mysql
54
55
56
57       Which  should  trigger  a  deployment pointing to the imported mysql:v1
58       tag.
59
60
61       Experimental: This feature is under active development and  may  change
62       without notice.
63
64
65

OPTIONS

67       --all=false
68           If  true,  select  all  resources in the namespace of the specified
69       resource types.
70
71
72       --allow-missing-template-keys=true
73           If true, ignore any errors in templates when a field or map key  is
74       missing  in  the  template.  Only applies to golang and jsonpath output
75       formats.
76
77
78       --dry-run=false
79           If true, only print the object that would be sent, without  sending
80       it.
81
82
83       --enabled=true
84           Mark the image stream as resolving tagged images in this namespace.
85
86
87       -f, --filename=[]
88           Filename, directory, or URL to files to use to edit the resource
89
90
91       --list=false
92           Display the current states of the requested resources.
93
94
95       --local=false
96           If true, operations will be performed locally.
97
98
99       -o, --output=""
100           Output format. One of: json|yaml|name|templatefile|template|go-tem‐
101       plate|go-template-file|jsonpath|jsonpath-file.
102
103
104       -R, --recursive=false
105           Process the directory used in -f,  --filename  recursively.  Useful
106       when  you  want  to  manage related manifests organized within the same
107       directory.
108
109
110       -l, --selector=""
111           Selector (label query) to filter on.
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

OPTIONS INHERITED FROM PARENT COMMANDS

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

EXAMPLE

374                # Print all of the image streams and whether they resolve local names
375                oc set image-lookup
376
377                # Use local name lookup on image stream mysql
378                oc set image-lookup mysql
379
380                # Force a deployment to use local name lookup
381                oc set image-lookup deploy/mysql
382
383                # Show the current status of the deployment lookup
384                oc set image-lookup deploy/mysql --list
385
386                # Disable local name lookup on image stream mysql
387                oc set image-lookup mysql --enabled=false
388
389                # Set local name lookup on all image streams
390                oc set image-lookup --all
391
392
393
394

SEE ALSO

396       oc-set(1),
397
398
399

HISTORY

401       June 2016, Ported from the Kubernetes man-doc generator
402
403
404
405Openshift                  Openshift CLI User Manuals                OC SET(1)
Impressum