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 --insecure-skip-tls-verify=false
230 If true, the server's certificate will not be checked for validity.
231 This will make your HTTPS connections insecure
232
233
234 --kubeconfig=""
235 Path to the kubeconfig file to use for CLI requests.
236
237
238 --log-flush-frequency=0
239 Maximum number of seconds between log flushes
240
241
242 --log_backtrace_at=:0
243 when logging hits line file:N, emit a stack trace
244
245
246 --log_cadvisor_usage=false
247 Whether to log the usage of the cAdvisor container
248
249
250 --log_dir=""
251 If non-empty, write log files in this directory
252
253
254 --logtostderr=true
255 log to standard error instead of files
256
257
258 --machine_id_file="/etc/machine-id,/var/lib/dbus/machine-id"
259 Comma-separated list of files to check for machine-id. Use the
260 first one that exists.
261
262
263 --match-server-version=false
264 Require server version to match client version
265
266
267 -n, --namespace=""
268 If present, the namespace scope for this CLI request
269
270
271 --request-timeout="0"
272 The length of time to wait before giving up on a single server
273 request. Non-zero values should contain a corresponding time unit (e.g.
274 1s, 2m, 3h). A value of zero means don't timeout requests.
275
276
277 -s, --server=""
278 The address and port of the Kubernetes API server
279
280
281 --stderrthreshold=2
282 logs at or above this threshold go to stderr
283
284
285 --storage_driver_buffer_duration=0
286 Writes in the storage driver will be buffered for this duration,
287 and committed to the non memory backends as a single transaction
288
289
290 --storage_driver_db="cadvisor"
291 database name
292
293
294 --storage_driver_host="localhost:8086"
295 database host:port
296
297
298 --storage_driver_password="root"
299 database password
300
301
302 --storage_driver_secure=false
303 use secure connection with database
304
305
306 --storage_driver_table="stats"
307 table name
308
309
310 --storage_driver_user="root"
311 database username
312
313
314 --token=""
315 Bearer token for authentication to the API server
316
317
318 --user=""
319 The name of the kubeconfig user to use
320
321
322 -v, --v=0
323 log level for V logs
324
325
326 --version=false
327 Print version information and quit
328
329
330 --vmodule=
331 comma-separated list of pattern=N settings for file-filtered log‐
332 ging
333
334
335
337 # Set a deployment configs's nginx container image to 'nginx:1.9.1', and its busybox container image to 'busybox'.
338 oc set image dc/nginx busybox=busybox nginx=nginx:1.9.1
339
340 # Set a deployment configs's app container image to the image referenced by the imagestream tag 'openshift/ruby:2.3'.
341 oc set image dc/myapp app=openshift/ruby:2.3 --source=imagestreamtag
342
343 # Update all deployments' and rc's nginx container's image to 'nginx:1.9.1'
344 oc set image deployments,rc nginx=nginx:1.9.1 --all
345
346 # Update image of all containers of daemonset abc to 'nginx:1.9.1'
347 oc set image daemonset abc *=nginx:1.9.1
348
349 # Print result (in yaml format) of updating nginx container image from local file, without hitting the server
350 oc set image -f path/to/file.yaml nginx=nginx:1.9.1 --local -o yaml
351
352
353
354
356 oc-set(1),
357
358
359
361 June 2016, Ported from the Kubernetes man-doc generator
362
363
364
365Openshift Openshift CLI User Manuals OC SET(1)