Member-only story

Practical K8s Tricks: So You Think You Can Probe

Frankie
5 min readSep 10, 2023

--

Good probes design makes systems robust, whereas poorly configured probes lead to tripping over your own feet.

Why probes are important

In Kubernetes, probes are used to diagnose the health of Pods. Understanding the different types of probes — readiness, liveness, and startup — and when to use them is crucial for running robust services on Kubernetes.

Without a clear understanding of how these probes function, you risk undesirable outcomes when combining them. For example, a poorly defined liveness probe, when used alongside a readiness probe for an application with slow startup times, could result in continual service failures and plunge the application into a crash loop.

Basic Probe Mechanism

In Kubernetes, probes can be configured to perform health checks using HTTP GET requests (httpGet), running commands within the container (exec), or opening a TCP socket (tcpSocket). Parameters like path and port specify the URL and port for HTTP or TCP checks, while command outlines the shell command for exec probes. Additional settings include initialDelaySeconds for the initial probe delay, periodSeconds for the probe frequency, and timeoutSeconds for probe timeouts. successThreshold and failureThreshold define the number of successful…

--

--

Frankie
Frankie

Written by Frankie

Software Engineer | Investor | Dad

No responses yet