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

NAME

6       oc set probe - Update a probe on a pod template
7
8
9

SYNOPSIS

11       oc set probe [OPTIONS]
12
13
14

DESCRIPTION

16       Set or remove a liveness or readiness probe from a pod or pod template
17
18
19       Each container in a pod may define one or more probes that are used for
20       general health checking. A liveness probe is  checked  periodically  to
21       ensure  the  container  is  still healthy: if the probe fails, the con‐
22       tainer is restarted. Readiness probes set or clear the ready  flag  for
23       each  container,  which  controls  whether  the  container's  ports are
24       included in the list of endpoints for a service and whether  a  deploy‐
25       ment can proceed. A readiness check should indicate when your container
26       is ready to accept incoming traffic or  begin  handling  work.  Setting
27       both  liveness and readiness probes for each container is highly recom‐
28       mended.
29
30
31       The three probe types are:
32
33       ·
34
35
36         · Open a TCP socket on the pod IP
37
38         · Perform an HTTP GET against a URL on a container that  must  return
39         200 OK
40
41         · Run a command in the container that must return exit code 0
42
43       Containers that take a variable amount of time to start should set gen‐
44       erous  initial-delay-seconds  values,  otherwise  as  your  application
45       evolves you may suddenly begin to fail.
46
47
48

OPTIONS

50       --all=false
51           If  true,  select  all  resources in the namespace of the specified
52       resource types
53
54
55       --allow-missing-template-keys=true
56           If true, ignore any errors in templates when a field or map key  is
57       missing  in  the  template.  Only applies to golang and jsonpath output
58       formats.
59
60
61       -c, --containers="*"
62           The names of containers in the selected pod templates to  change  -
63       may use wildcards
64
65
66       --dry-run=false
67           If  true, only print the object that would be sent, without sending
68       it.
69
70
71       --failure-threshold=0
72           The number of failures before  the  probe  is  considered  to  have
73       failed
74
75
76       -f, --filename=[]
77           Filename, directory, or URL to files to use to edit the resource
78
79
80       --get-url=""
81           A  URL  to  perform  an  HTTP GET on (you can omit the host, have a
82       string port, or omit the scheme.
83
84
85       --initial-delay-seconds=0
86           The time in seconds to wait before the probe begins checking
87
88
89       --liveness=false
90           Set or remove a liveness probe to verify this container is running
91
92
93       --local=false
94           If true, set image will NOT contact api-server but run locally.
95
96
97       --open-tcp=""
98           A port number or port name to attempt to open via TCP.
99
100
101       -o, --output=""
102           Output format. One of:  json|yaml|name|template|go-template|go-tem‐
103       plate-file|templatefile|jsonpath|jsonpath-file.
104
105
106       --period-seconds=0
107           The time in seconds between attempts
108
109
110       --readiness=false
111           Set  or  remove  a  readiness probe to indicate when this container
112       should receive traffic
113
114
115       -R, --recursive=false
116           Process the directory used in -f,  --filename  recursively.  Useful
117       when  you  want  to  manage related manifests organized within the same
118       directory.
119
120
121       --remove=false
122           If true, remove the specified probe(s).
123
124
125       -l, --selector=""
126           Selector (label query) to filter on
127
128
129       --success-threshold=0
130           The number of successes required before  the  probe  is  considered
131       successful
132
133
134       --template=""
135           Template  string  or  path  to template file to use when -o=go-tem‐
136       plate, -o=go-template-file. The template format is golang  templates  [
137http://golang.org/pkg/text/template/#pkg-overview⟩].
138
139
140       --timeout-seconds=0
141           The  time  in  seconds to wait before considering the probe to have
142       failed
143
144
145

OPTIONS INHERITED FROM PARENT COMMANDS

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

EXAMPLE

395                # Clear both readiness and liveness probes off all containers
396                oc set probe dc/registry --remove --readiness --liveness
397
398                # Set an exec action as a liveness probe to run 'echo ok'
399                oc set probe dc/registry --liveness -- echo ok
400
401                # Set a readiness probe to try to open a TCP socket on 3306
402                oc set probe rc/mysql --readiness --open-tcp=3306
403
404                # Set an HTTP readiness probe for port 8080 and path /healthz over HTTP on the pod IP
405                oc set probe dc/webapp --readiness --get-url=http://:8080/healthz
406
407                # Set an HTTP readiness probe over HTTPS on 127.0.0.1 for a hostNetwork pod
408                oc set probe dc/router --readiness --get-url=https://127.0.0.1:1936/stats
409
410                # Set only the initial-delay-seconds field on all deployments
411                oc set probe dc --all --readiness --initial-delay-seconds=30
412
413
414
415

SEE ALSO

417       oc-set(1),
418
419
420

HISTORY

422       June 2016, Ported from the Kubernetes man-doc generator
423
424
425
426Openshift                  Openshift CLI User Manuals                OC SET(1)
Impressum