From fd48554659776b82da9f6a32b7627f047591578b Mon Sep 17 00:00:00 2001 From: kayrus Date: Tue, 18 Oct 2016 14:39:12 +0200 Subject: [PATCH] Added livenessprobe example with hidden parameters --- docs/user-guide/pod-states.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docs/user-guide/pod-states.md b/docs/user-guide/pod-states.md index 8806e3be7c..b29270e5f8 100644 --- a/docs/user-guide/pod-states.md +++ b/docs/user-guide/pod-states.md @@ -89,6 +89,40 @@ If a node dies or is disconnected from the rest of the cluster, some entity with ## Examples +### Advanced livenessProbe example + +Liveness probes are executed by `kubelet`, so all requests will be made within kubelet network namespace. + +```yaml +apiVersion: v1 +kind: Pod +metadata: + labels: + test: liveness + name: liveness-http +spec: + containers: + - args: + - /server + image: gcr.io/google_containers/liveness + livenessProbe: + httpGet: + # when "host" is not defined, "PodIP" will be used + # host: my-host + # when "scheme" is not defined, "HTTP" scheme will be used. Only "HTTP" and "HTTPS" are allowed + # scheme: HTTPS + path: /healthz + port: 8080 + httpHeaders: + - name: X-Custom-Header + value: Awesome + initialDelaySeconds: 15 + timeoutSeconds: 1 + name: liveness +``` + +### Example states + * Pod is `Running`, 1 container, container exits success * Log completion event * If RestartPolicy is: