Kubernetes offers several features that can be used together to create self-healing applications in a variety of scenarios. In this lab, you will be able to practice your skills at using features such as probes and restart policies to create a container application that is automatically healed when it stops working.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Set a Restart Policy to Restart the Container When It Is Down
Find the
beebox-shipping-data
pod located in thedefault
namespace. Modify this pod so itsrestartPolicy
will restart the container whenever it fails.Note: You may need to delete and re-create the pod in order to make this change.
- Create a Liveness Probe to Detect When the Application Has Crashed
Add a liveness probe to the container that checks the container status by making an HTTP request to the container every
5
seconds. The request should check the/
(root) path on port8080
.Note: You may need to delete and re-create the pod in order to make this change.