Question-111: What is “liveness” health check?
Answer: As we have “health check” process is used by the Kubernetes itself to check your process is live or not. But it is possible that your process is up but not running properly then in that case you have to use application specific logic. Like website page is available or not. In that case you can use “liveness” health check and that would be used to run application specific checks. This you have to define explicitly in your Pod manifest file. This “Liveness Probe” is defined per container, which means each container inside the Pod is having process running.
Question-112: What are the various parameters you can define for liveness Probe in manifest file?
Answer: Following are the parameters you can use but these are mainly used
- initialDelaySeconds: As soon as container deployed, after these many seconds (e.g. 10 seconds) this check would be called.
- timeoutSeconds: Probe should return in these many seconds (e.g. 5 seconds) to be considered successful.
- periodSeconds: It will try these many seconds (e.g. 10 seconds).
- failureThresold: If more than these many numbers (e.g. 3 times) if probe fails, then it would be considered container fail and restart it.