root@master1:~/k8s-oc-yaml/application# kubectl create -f pod-liveness-exec.yaml
pod "liveness-exec" created
kubectl describe pod liveness-exec
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 1m default-scheduler Successfully assigned liveness-exec to node1
Normal SuccessfulMountVolume 1m kubelet, node1 MountVolume.SetUp succeeded for volume "default-token-8lv8j"
Normal Pulling 1m kubelet, node1 pulling image "registry.cn-hangzhou.aliyuncs.com/misa/busybox:1.28"
Normal Pulled 18s kubelet, node1 Successfully pulled image "registry.cn-hangzhou.aliyuncs.com/misa/busybox:1.28"
Normal Created 18s kubelet, node1 Created container
Normal Started 18s kubelet, node1 Started container
kubectl describe pod liveness-exec
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 11m default-scheduler Successfully assigned liveness-exec to node1
Normal SuccessfulMountVolume 11m kubelet, node1 MountVolume.SetUp succeeded for volume "default-token-8lv8j"
Normal Pulling 11m kubelet, node1 pulling image "registry.cn-hangzhou.aliyuncs.com/misa/busybox:1.28"
Normal Pulled 10m kubelet, node1 Successfully pulled image "registry.cn-hangzhou.aliyuncs.com/misa/busybox:1.28"
Normal Started 8m (x3 over 10m) kubelet, node1 Started container
Normal Created 6m (x4 over 10m) kubelet, node1 Created container
Normal Killing 6m (x3 over 9m) kubelet, node1 Killing container with id docker://liveness:Container failed liveness probe.. Container will be killed and recreated.
Normal Pulled 6m (x3 over 9m) kubelet, node1 Container image "registry.cn-hangzhou.aliyuncs.com/misa/busybox:1.28" already present on machine
Warning Unhealthy 1m (x19 over 9m) kubelet, node1 Liveness probe failed: cat: can't open '/tmp/healthy': No such file or directory