File-Aware Readiness Probe for Container Initialization
Create a Pod with a readiness probe that checks for the existence of a file inside the container to determine its ready state.
Scenerio
Create a single Pod named python-app-pod in namespace python-app of image busybox:stable.
The Pod should have a readiness probe executing:
cat /src/main.py
It should initially wait 15 seconds, periodically wait 15 seconds, and have failureThreshold set to 2.
This will set the container ready only if the file /src/main.py exists.
Hint
Use a container command that creates /src/main.py and keeps the container running (sleep), and an exec readinessProbe (cat /src/main.py) so the Pod becomes Ready only when the file exists.