Readiness probe

The second probe available is the readiness probe, most often used in parallel with the liveness probe. The readiness probe is expected to respond positively only when your application is ready and able to service normal requests. For example, if you want to wait until your database is fully operational, or pre-load some caches that can take a few seconds, you probably don’t want to return a positive response for a readiness probe until those operations have completed.

Like the liveness probe, if it is not defined, the system assumes that as soon as your code is running that it is also ready to accept requests. If you have code that takes a few seconds to get fully operational, then it is very worthwhile to define and utilize ...

Get Kubernetes for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.