cancel
Showing results for 
Search instead for 
Did you mean: 
Jcalvod
Flight Engineer
Flight Engineer
  • 853 Views

DO0280 - RELIABILITY startupProbe Endpoint ( /health or /healthz ????? )

Jump to solution

Hi collegues,

Studying at the DO0180 and DO0280 in order to prepare better my next try to the exam i have found something that appear to not be explained in the labs...

In some labs is used for example in startupProbes an /health endpoint in order to test if our application have finished it's startup process succesfully or not... using this kind of probe (startupProbe) we can see that in our pods it's state change to running when startup process have finished etc. but something that i have found and now I don't understand very well is why in Openshift 4.12 Documentation in Building Aplications / Aplication Health we find that this endpoint appear with a Z at the end ( /heathz ) and not ( /health ) and the most important, why in our lab if I use /healthz instead of /health appear this error ?

Jcalvod_1-1717782512602.png

 

Jcalvod_0-1717782482640.png

My objetive is to understand why....

Labels (4)
1 Solution

Accepted Solutions
ecrookshanks
Mission Specialist
Mission Specialist
  • 841 Views

The "health" probes are actually defined as a liveness probe and a startup probe.  The endpoint for each of those is configurable and can be defined as anything - "/health" is just one convention, but theoretically can be anything you choose.  In the documentation (docs.openshift.com) the example is given as this:

livenessProbe:
   httpGet:
   scheme: HTTPS
   path: /healthz
   port: 8080
   httpHeaders:
      - name: X-Custom-Header
        value: Awesome

View solution in original post

3 Replies
ecrookshanks
Mission Specialist
Mission Specialist
  • 842 Views

The "health" probes are actually defined as a liveness probe and a startup probe.  The endpoint for each of those is configurable and can be defined as anything - "/health" is just one convention, but theoretically can be anything you choose.  In the documentation (docs.openshift.com) the example is given as this:

livenessProbe:
   httpGet:
   scheme: HTTPS
   path: /healthz
   port: 8080
   httpHeaders:
      - name: X-Custom-Header
        value: Awesome

Jcalvod
Flight Engineer
Flight Engineer
  • 834 Views

I understand your apointment but in our labs for example previously we do not know what endpoint should we use and what port... if i am understanding you this data should be informed in an exercise in the exam in order to use it . correct ?

0 Kudos
ecrookshanks
Mission Specialist
Mission Specialist
  • 800 Views

Possibly.  But remember YOU can define the endpoint.  It has to be useful to your application, and those specifics are being defined so that the platform may call them.  In the previous example there would need to be a web server running on port 8080 and defining an endpoint for "/healthz" - this is what the platform would call to check "liveness".  If your webserver was running on port 9000 with a health endpoint of "/areyougood" you would have to specify that.  If the name, protocol, and port were specified then you would have to verify that the application supported those and then use that.

0 Kudos
Join the discussion
You must log in to join this conversation.