| 1. |
In Kubernetes - A Pod is running 2 containers, when One container stops - another Container is still running, on this event, I want to terminate this Pod? |
|
Answer» You need to add a liveness and readiness probe to query each container, if the probe fails, the entire pod will be restarted .add liveness object that calls any API that RETURNS 200 to you from another container and both liveness and readiness probes run in infinite loops for example, If X depended to Y So add liveness in X that CHECK the health of Y.Both readiness/liveness probes always have to run after the container has been started .kubelet COMPONENT performs the liveness/readiness checks and set initialDelaySeconds and it can be anything from a few seconds to a few minutes depending on app start time. Below is the configuration spec
|
|