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 ?
My objetive is to understand why....
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
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
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 ?
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.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.