1OC SET(1) June 2016 OC SET(1)
2
3
4
6 oc set image - Update image of a pod template
7
8
9
11 oc set image [OPTIONS]
12
13
14
16 Update existing container image(s) of resources.
17
18
19
21 --all=false
22 Select all resources, including uninitialized ones, in the names‐
23 pace of the specified resource types
24
25
26 --allow-missing-template-keys=true
27 If true, ignore any errors in templates when a field or map key is
28 missing in the template. Only applies to golang and jsonpath output
29 formats.
30
31
32 --dry-run=false
33 If true, only print the object that would be sent, without sending
34 it.
35
36
37 -f, --filename=[]
38 Filename, directory, or URL to files identifying the resource to
39 get from a server.
40
41
42 --include-uninitialized=false
43 If true, the kubectl command applies to uninitialized objects. If
44 explicitly set to false, this flag overrides other flags that make the
45 kubectl commands apply to uninitialized objects, e.g., "--all". Objects
46 with empty metadata.initializers are regarded as initialized.
47
48
49 --local=false
50 If true, set image will NOT contact api-server but run locally.
51
52
53 -o, --output=""
54 Output format. One of: json|yaml|name|templatefile|template|go-tem‐
55 plate|go-template-file|jsonpath|jsonpath-file.
56
57
58 --record=false
59 Record current kubectl command in the resource annotation. If set
60 to false, do not record the command. If set to true, record the com‐
61 mand. If not set, default to updating the existing annotation value
62 only if one already exists.
63
64
65 -R, --recursive=false
66 Process the directory used in -f, --filename recursively. Useful
67 when you want to manage related manifests organized within the same
68 directory.
69
70
71 -l, --selector=""
72 Selector (label query) to filter on, not including uninitialized
73 ones, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
74
75
76 --source="docker"
77 The image source type; valid types are 'imagestreamtag', 'istag',
78 'imagestreamimage', 'isimage', and 'docker'
79
80
81 --template=""
82 Template string or path to template file to use when -o=go-tem‐
83 plate, -o=go-template-file. The template format is golang templates [
84 ⟨http://golang.org/pkg/text/template/#pkg-overview⟩].
85
86
87
89 --allow_verification_with_non_compliant_keys=false
90 Allow a SignatureVerifier to use keys which are technically
91 non-compliant with RFC6962.
92
93
94 --alsologtostderr=false
95 log to standard error as well as files
96
97
98 --application_metrics_count_limit=100
99 Max number of application metrics to store (per container)
100
101
102 --as=""
103 Username to impersonate for the operation
104
105
106 --as-group=[]
107 Group to impersonate for the operation, this flag can be repeated
108 to specify multiple groups.
109
110
111 --azure-container-registry-config=""
112 Path to the file containing Azure container registry configuration
113 information.
114
115
116 --boot_id_file="/proc/sys/kernel/random/boot_id"
117 Comma-separated list of files to check for boot-id. Use the first
118 one that exists.
119
120
121 --cache-dir="/builddir/.kube/http-cache"
122 Default HTTP cache directory
123
124
125 --certificate-authority=""
126 Path to a cert file for the certificate authority
127
128
129 --client-certificate=""
130 Path to a client certificate file for TLS
131
132
133 --client-key=""
134 Path to a client key file for TLS
135
136
137 --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
138 CIDRs opened in GCE firewall for LB traffic proxy health checks
139
140
141 --cluster=""
142 The name of the kubeconfig cluster to use
143
144
145 --container_hints="/etc/cadvisor/container_hints.json"
146 location of the container hints file
147
148
149 --containerd="unix:///var/run/containerd.sock"
150 containerd endpoint
151
152
153 --context=""
154 The name of the kubeconfig context to use
155
156
157 --default-not-ready-toleration-seconds=300
158 Indicates the tolerationSeconds of the toleration for
159 notReady:NoExecute that is added by default to every pod that does not
160 already have such a toleration.
161
162
163 --default-unreachable-toleration-seconds=300
164 Indicates the tolerationSeconds of the toleration for unreach‐
165 able:NoExecute that is added by default to every pod that does not
166 already have such a toleration.
167
168
169 --docker="unix:///var/run/docker.sock"
170 docker endpoint
171
172
173 --docker-tls=false
174 use TLS to connect to docker
175
176
177 --docker-tls-ca="ca.pem"
178 path to trusted CA
179
180
181 --docker-tls-cert="cert.pem"
182 path to client certificate
183
184
185 --docker-tls-key="key.pem"
186 path to private key
187
188
189 --docker_env_metadata_whitelist=""
190 a comma-separated list of environment variable keys that needs to
191 be collected for docker containers
192
193
194 --docker_only=false
195 Only report docker containers in addition to root stats
196
197
198 --docker_root="/var/lib/docker"
199 DEPRECATED: docker root is read from docker info (this is a fall‐
200 back, default: /var/lib/docker)
201
202
203 --enable_load_reader=false
204 Whether to enable cpu load reader
205
206
207 --event_storage_age_limit="default=24h"
208 Max length of time for which to store events (per type). Value is a
209 comma separated list of key values, where the keys are event types
210 (e.g.: creation, oom) or "default" and the value is a duration. Default
211 is applied to all non-specified event types
212
213
214 --event_storage_event_limit="default=100000"
215 Max number of events to store (per type). Value is a comma sepa‐
216 rated list of key values, where the keys are event types (e.g.: cre‐
217 ation, oom) or "default" and the value is an integer. Default is
218 applied to all non-specified event types
219
220
221 --global_housekeeping_interval=0
222 Interval between global housekeepings
223
224
225 --housekeeping_interval=0
226 Interval between container housekeepings
227
228
229 --httptest.serve=""
230 if non-empty, httptest.NewServer serves on this address and blocks
231
232
233 --insecure-skip-tls-verify=false
234 If true, the server's certificate will not be checked for validity.
235 This will make your HTTPS connections insecure
236
237
238 --kubeconfig=""
239 Path to the kubeconfig file to use for CLI requests.
240
241
242 --log-flush-frequency=0
243 Maximum number of seconds between log flushes
244
245
246 --log_backtrace_at=:0
247 when logging hits line file:N, emit a stack trace
248
249
250 --log_cadvisor_usage=false
251 Whether to log the usage of the cAdvisor container
252
253
254 --log_dir=""
255 If non-empty, write log files in this directory
256
257
258 --logtostderr=true
259 log to standard error instead of files
260
261
262 --machine_id_file="/etc/machine-id,/var/lib/dbus/machine-id"
263 Comma-separated list of files to check for machine-id. Use the
264 first one that exists.
265
266
267 --match-server-version=false
268 Require server version to match client version
269
270
271 -n, --namespace=""
272 If present, the namespace scope for this CLI request
273
274
275 --request-timeout="0"
276 The length of time to wait before giving up on a single server
277 request. Non-zero values should contain a corresponding time unit (e.g.
278 1s, 2m, 3h). A value of zero means don't timeout requests.
279
280
281 -s, --server=""
282 The address and port of the Kubernetes API server
283
284
285 --stderrthreshold=2
286 logs at or above this threshold go to stderr
287
288
289 --storage_driver_buffer_duration=0
290 Writes in the storage driver will be buffered for this duration,
291 and committed to the non memory backends as a single transaction
292
293
294 --storage_driver_db="cadvisor"
295 database name
296
297
298 --storage_driver_host="localhost:8086"
299 database host:port
300
301
302 --storage_driver_password="root"
303 database password
304
305
306 --storage_driver_secure=false
307 use secure connection with database
308
309
310 --storage_driver_table="stats"
311 table name
312
313
314 --storage_driver_user="root"
315 database username
316
317
318 --token=""
319 Bearer token for authentication to the API server
320
321
322 --user=""
323 The name of the kubeconfig user to use
324
325
326 -v, --v=0
327 log level for V logs
328
329
330 --version=false
331 Print version information and quit
332
333
334 --vmodule=
335 comma-separated list of pattern=N settings for file-filtered log‐
336 ging
337
338
339
341 # Set a deployment configs's nginx container image to 'nginx:1.9.1', and its busybox container image to 'busybox'.
342 oc set image dc/nginx busybox=busybox nginx=nginx:1.9.1
343
344 # Set a deployment configs's app container image to the image referenced by the imagestream tag 'openshift/ruby:2.3'.
345 oc set image dc/myapp app=openshift/ruby:2.3 --source=imagestreamtag
346
347 # Update all deployments' and rc's nginx container's image to 'nginx:1.9.1'
348 oc set image deployments,rc nginx=nginx:1.9.1 --all
349
350 # Update image of all containers of daemonset abc to 'nginx:1.9.1'
351 oc set image daemonset abc *=nginx:1.9.1
352
353 # Print result (in yaml format) of updating nginx container image from local file, without hitting the server
354 oc set image -f path/to/file.yaml nginx=nginx:1.9.1 --local -o yaml
355
356
357
358
360 oc-set(1),
361
362
363
365 June 2016, Ported from the Kubernetes man-doc generator
366
367
368
369Openshift Openshift CLI User Manuals OC SET(1)