mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #13220 from aveshagarwal/master-issue-12740
httpGet livenessprobe fails for controller and scheduler when following steps in scratch.md (fixes #12740)
This commit is contained in:
commit
5c2c42eed8
@ -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
|
||||
},
|
||||
|
@ -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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user