In this exercise, you will learn how to setup health checks for your application.
If you want to, you can create a new project based on what you have learned in the previous labs. Since we already have a project we will use it. Run the following command to make sure.
Step 1 Make sure welcome application is deployed
-
Click
lab2-username
project -
Make sure you have the welcome php application deploy.
-
If not, click
Add to project
if you are not already in the Browse Catalog. -
Click
PHP
under Browse Catalog -
Click
Select
in the PHP box -
Enter: phpapp as name
-
Enter: https://github.com/RedHatWorkshops/welcome-php.git as Git Repository URL
Step 2 Setup Application Health Checks
-
Click
Applications
-→Deployments
-
Click on the name of Deployment that you need to add health checks
-
Click
Actions
(top right) -→ selectEdit Health Checks
-
Click onto
Add Readiness Probe
-
Enter
/healthz.php
as Path -
Enter
10
for Initial Delay seconds -
Enter
20
for timeout seconds -
Click onto
Add Liveness Probe
-
Enter
/healthz.php
for Path -
Enter
120
for Initial Delay seconds -
Click
Save
-
Application will be redeploy