Advanced Features
Using IMDS to get the status of a replica
Last Updated: October 15, 2024
We can use the IMDS to retrieve the current status of the replica from inside the workload. This can be achieved using
either the IMDS SDK, or the JSON request endpoint. In this example, we’ll create a Python script using the IMDS SDK to
check whether the container is ready, and start a bash script when it is.
Now, if we run this on a container that has passed its
startup probe, but not completed its
readiness probe, we’ll see this: