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 in‐
24       cluded in the list of endpoints for a service and whether a  deployment
25       can  proceed.  A readiness check should indicate when your container is
26       ready to accept incoming traffic or begin handling work.  Setting  both
27       liveness and readiness probes for each container is highly recommended.
28
29
30       The three probe types are:
31
32
33
34
35         • Open a TCP socket on the pod IP
36
37         •  Perform  an HTTP GET against a URL on a container that must return
38         200 OK
39
40         • Run a command in the container that must return exit code 0
41
42       Containers that take a variable amount of time to start should set gen‐
43       erous  initial-delay-seconds  values,  otherwise  as  your  application
44       evolves you may suddenly begin to fail.
45
46
47

OPTIONS

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

OPTIONS INHERITED FROM PARENT COMMANDS

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

EXAMPLE

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

SEE ALSO

416       oc-set(1),
417
418
419

HISTORY

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