13 Specify the port on which the container is listening. 

14 Optional: Create a Startup probe. 

15 Specify the type of test to perform, here an Container Execution probe. 

16 Specify the commands to execute on the container. 

17 Specify the number of times to try the probe after a failure. 

18 Specify the number of seconds to perform the probe. The default is 10 . This value must be greater than timeoutSeconds . 

19 Specify the number of seconds of inactivity after which the probe is assumed to have failed. The default is 1 . This value must be lower than periodSeconds . 

## NOTE 

If the initialDelaySeconds  value is lower than the periodSeconds  value, the first Readiness probe occurs at some point between the two periods due to an issue with timers. 

The timeoutSeconds  value must be lower than the periodSeconds  value. 

2. Create the Pod  object: 

3. Verify the state of the health check pod: 

## Example output 

$ oc create -f <file-name>.yaml 

$ oc describe pod health-check 

Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 9s default-scheduler Successfully assigned openshift- logging/liveness-exec to ip-10-0-143-40.ec2.internal Normal Pulling 2s kubelet, ip-10-0-143-40.ec2.internal pulling image "k8s.gcr.io/liveness" Normal Pulled 1s kubelet, ip-10-0-143-40.ec2.internal Successfully pulled image "k8s.gcr.io/liveness" Normal Created 1s kubelet, ip-10-0-143-40.ec2.internal Created container Normal Started 1s kubelet, ip-10-0-143-40.ec2.internal Started container 

The following is the output of a failed probe that restarted a container: 

## Sample Liveness check output with unhealthy container 

$ oc describe pod pod1 

## Example output 

