Setup liveness and readiness probe endpoints on a predefined port.
The result will contain two objects liveness & readiness which can be used to set the appropriate values
depending on the service state.
By default, an http server will be started listening on port 9000. The liveness will be accessible via the
path /live and will be set to true. The readiness will be accessible via the path /ready and will be set
to false.
The readiness will need to be set to true once the service is considered ready to be serving requests.
Following HTTP status codes along with the messages will be returned based on the liveness & readiness state values.
Setup liveness and readiness probe endpoints on a predefined port. The result will contain two objects
liveness
&readiness
which can be used to set the appropriate values depending on the service state.By default, an http server will be started listening on port
9000
. The liveness will be accessible via the path/live
and will be set totrue
. The readiness will be accessible via the path/ready
and will be set tofalse
. Thereadiness
will need to be set totrue
once the service is considered ready to be serving requests.Following HTTP status codes along with the messages will be returned based on the liveness & readiness state values.
Liveness:
Readiness: