From a64d8d4f7bb299c675f83fa101ba7491d03ac9fc Mon Sep 17 00:00:00 2001 From: Avesh Agarwal Date: Fri, 28 Aug 2015 22:03:33 -0400 Subject: [PATCH 1/2] Updates scratch.md to send httpGet livenessprobe to 127.0.0.1 for controller-manager and scheduler as they both listen on 127.0.0.1 by default. This fixes #12740. --- docs/getting-started-guides/scratch.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/getting-started-guides/scratch.md b/docs/getting-started-guides/scratch.md index 75fb0ebe129..0ac88880870 100644 --- a/docs/getting-started-guides/scratch.md +++ b/docs/getting-started-guides/scratch.md @@ -710,6 +710,7 @@ Complete this template for the scheduler pod: ], "livenessProbe": { "httpGet": { + "host" : "127.0.0.1", "path": "/healthz", "port": 10251 }, @@ -766,6 +767,7 @@ Template for controller manager pod: ], "livenessProbe": { "httpGet": { + "host": "127.0.0.1", "path": "/healthz", "port": 10252 }, From 99c7a0854c32077ea7678236d71a079b788bb5e0 Mon Sep 17 00:00:00 2001 From: Avesh Agarwal Date: Fri, 28 Aug 2015 22:04:12 -0400 Subject: [PATCH 2/2] Updates the liveness user guide README to describe the host part of httpGet probe. --- docs/user-guide/liveness/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/liveness/README.md b/docs/user-guide/liveness/README.md index b175078b8ff..f894a97aa17 100644 --- a/docs/user-guide/liveness/README.md +++ b/docs/user-guide/liveness/README.md @@ -69,7 +69,7 @@ The [http-liveness.yaml](http-liveness.yaml) demonstrates the HTTP check. timeoutSeconds: 1 ``` -The Kubelet sends a HTTP request to the specified path and port to perform the health check. If you take a look at image/server.go, you will see the server starts to respond with an error code 500 after 10 seconds, so the check fails. +The Kubelet sends an HTTP request to the specified path and port to perform the health check. If you take a look at image/server.go, you will see the server starts to respond with an error code 500 after 10 seconds, so the check fails. The Kubelet sends the probe to the container's ip address by default which could be specified with `host` as part of httpGet probe. If the container listens on `127.0.0.1`, `host` should be specified as `127.0.0.1`. In general, if the container listens on its ip address or on all interfaces (0.0.0.0), there is no need to specify the `host` as part of the httpGet probe. This [guide](../walkthrough/k8s201.md#health-checking) has more information on health checks.