From the course: Certified Kubernetes Application Developer (CKAD) Cert Prep

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Using probes to monitor applications

Using probes to monitor applications

- So probes provide the common solution to monitor applications. The probe itself is a simple test that is defined as a container property and in many cases it's a command. Probes are used to test if the application that uses it is still functional, and if the probe doesn't respond, the application is restarted. So that will be considered as failure. And you can use different probe test types in pods.spec.container. There is exec, which is a command that is executed and you are expected to return a zero exit value. There is httpGet, which is a little bit more sophisticated because it checks if an HTTP request returns a response code between 200 and 399, which is typically what is an indicator that HTTP is successful. There is tcpSocket, which tests connectivity to a TCP socket, also known as a port. Probes can be configured with a failure threshold to determine how long it can take the application to react. Sometimes it makes sense to give the application a little bit of time. Now…

Contents