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