Check the status of the pods once they are created:
Check the status of the pods once they are created:
```
```console
# kubectl get pods
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
NAME READY STATUS RESTARTS AGE
[...]
[...]
liveness-exec 1/1 Running 0 13s
liveness-exec 1/1 Running 0 13s
...
@@ -94,8 +94,8 @@ liveness-http 1/1 Running 0
...
@@ -94,8 +94,8 @@ liveness-http 1/1 Running 0
Check the status half a minute later, you will see the container restart count being incremented:
Check the status half a minute later, you will see the container restart count being incremented:
```
```console
# kubectl get pods
$ kubectl get pods
mwielgus@mwielgusd:~/test/k2/kubernetes/examples/liveness$ kubectl get pods
mwielgus@mwielgusd:~/test/k2/kubernetes/examples/liveness$ kubectl get pods
NAME READY STATUS RESTARTS AGE
NAME READY STATUS RESTARTS AGE
[...]
[...]
...
@@ -105,8 +105,8 @@ liveness-http 1/1 Running 1
...
@@ -105,8 +105,8 @@ liveness-http 1/1 Running 1
At the bottom of the *kubectl describe* output there are messages indicating that the liveness probes have failed, and the containers have been killed and recreated.
At the bottom of the *kubectl describe* output there are messages indicating that the liveness probes have failed, and the containers have been killed and recreated.
```
```console
# kubectl describe pods liveness-exec
$ kubectl describe pods liveness-exec
[...]
[...]
Sat, 27 Jun 2015 13:43:03 +0200 Sat, 27 Jun 2015 13:44:34 +0200 4 {kubelet kubernetes-minion-6fbi} spec.containers{liveness} unhealthy Liveness probe failed: cat: can't open '/tmp/health': No such file or directory
Sat, 27 Jun 2015 13:43:03 +0200 Sat, 27 Jun 2015 13:44:34 +0200 4 {kubelet kubernetes-minion-6fbi} spec.containers{liveness} unhealthy Liveness probe failed: cat: can't open '/tmp/health': No such file or directory
Sat, 27 Jun 2015 13:44:44 +0200 Sat, 27 Jun 2015 13:44:44 +0200 1 {kubelet kubernetes-minion-6fbi} spec.containers{liveness} killing Killing with docker id 65b52d62c635
Sat, 27 Jun 2015 13:44:44 +0200 Sat, 27 Jun 2015 13:44:44 +0200 1 {kubelet kubernetes-minion-6fbi} spec.containers{liveness} killing Killing with docker id 65b52d62c635