@@ -81,13 +81,13 @@ kubectl describe pod liveness-exec
81
81
The output indicates that no liveness probes have failed yet:
82
82
83
83
```
84
- FirstSeen LastSeen Count From SubobjectPath Type Reason Message
85
- --------- -------- ----- ---- ------------- -------- ------ -------
86
- 24s 24s 1 { default-scheduler } Normal Scheduled Successfully assigned liveness-exec to worker0
87
- 23s 23s 1 { kubelet worker0} spec.containers{liveness} Normal Pulling pulling image "k8s.gcr.io/busybox"
88
- 23s 23s 1 { kubelet worker0} spec.containers{liveness} Normal Pulled Successfully pulled image "k8s.gcr.io/busybox"
89
- 23s 23s 1 { kubelet worker0} spec.containers{liveness} Normal Created Created container with docker id 86849c15382e; Security:[seccomp=unconfined]
90
- 23s 23s 1 { kubelet worker0} spec.containers{liveness} Normal Started Started container with docker id 86849c15382e
84
+ Type Reason Age From Message
85
+ ---- ------ ---- ---- -------
86
+ Normal Scheduled 11s default-scheduler Successfully assigned default/ liveness-exec to node01
87
+ Normal Pulling 9s kubelet, node01 Pulling image "k8s.gcr.io/busybox"
88
+ Normal Pulled 7s kubelet, node01 Successfully pulled image "k8s.gcr.io/busybox"
89
+ Normal Created 7s kubelet, node01 Created container liveness
90
+ Normal Started 7s kubelet, node01 Started container liveness
91
91
```
92
92
93
93
After 35 seconds, view the Pod events again:
@@ -100,14 +100,15 @@ At the bottom of the output, there are messages indicating that the liveness
100
100
probes have failed, and the containers have been killed and recreated.
101
101
102
102
```
103
- FirstSeen LastSeen Count From SubobjectPath Type Reason Message
104
- --------- -------- ----- ---- ------------- -------- ------ -------
105
- 37s 37s 1 {default-scheduler } Normal Scheduled Successfully assigned liveness-exec to worker0
106
- 36s 36s 1 {kubelet worker0} spec.containers{liveness} Normal Pulling pulling image "k8s.gcr.io/busybox"
107
- 36s 36s 1 {kubelet worker0} spec.containers{liveness} Normal Pulled Successfully pulled image "k8s.gcr.io/busybox"
108
- 36s 36s 1 {kubelet worker0} spec.containers{liveness} Normal Created Created container with docker id 86849c15382e; Security:[seccomp=unconfined]
109
- 36s 36s 1 {kubelet worker0} spec.containers{liveness} Normal Started Started container with docker id 86849c15382e
110
- 2s 2s 1 {kubelet worker0} spec.containers{liveness} Warning Unhealthy Liveness probe failed: cat: can't open '/tmp/healthy': No such file or directory
103
+ Type Reason Age From Message
104
+ ---- ------ ---- ---- -------
105
+ Normal Scheduled 57s default-scheduler Successfully assigned default/liveness-exec to node01
106
+ Normal Pulling 55s kubelet, node01 Pulling image "k8s.gcr.io/busybox"
107
+ Normal Pulled 53s kubelet, node01 Successfully pulled image "k8s.gcr.io/busybox"
108
+ Normal Created 53s kubelet, node01 Created container liveness
109
+ Normal Started 53s kubelet, node01 Started container liveness
110
+ Warning Unhealthy 10s (x3 over 20s) kubelet, node01 Liveness probe failed: cat: can't open '/tmp/healthy': No such file or directory
111
+ Normal Killing 10s kubelet, node01 Container liveness failed liveness probe, will be restarted
111
112
```
112
113
113
114
Wait another 30 seconds, and verify that the container has been restarted:
0 commit comments