Health Probe Examples

HTTP Endpoint Using Exec with CURL

By running an exec health probe with CURL you can process the response code to check for specific status codes or values contained within the response.

In this example the exec command is run and returns a healthy state if the http status code from the /healthz endpoint is 200

"/bin/sh",
"-c",
"curl -s -o /dev/null -I -w \"%{http_code}\" localhost:4001/healthz | grep 200"