PROFESSIONAL-CLOUD-DEVELOPER · Question #239
You have a container deployed on Google Kubernetes Engine. The container can sometimes be slow to launch, so you have implemented a liveness probe. You notice that the liveness probe occasionally fail
The correct answer is A. Add a startup probe.. A startup probe is specifically designed to handle slow-starting containers. When a startup probe is defined, it disables the liveness probe until the startup probe succeeds, preventing Kubernetes from killing a container that is still initializing. Once the startup probe succeed
Question
You have a container deployed on Google Kubernetes Engine. The container can sometimes be slow to launch, so you have implemented a liveness probe. You notice that the liveness probe occasionally fails on launch. What should you do?
Options
- AAdd a startup probe.
- BIncrease the initial delay for the liveness probe.
- CIncrease the CPU limit for the container.
- DAdd a readiness probe.
How the community answered
(40 responses)- A78% (31)
- B5% (2)
- C3% (1)
- D15% (6)
Explanation
A startup probe is specifically designed to handle slow-starting containers. When a startup probe is defined, it disables the liveness probe until the startup probe succeeds, preventing Kubernetes from killing a container that is still initializing. Once the startup probe succeeds, the liveness probe takes over. This is the Kubernetes-recommended best practice for slow-starting containers. Option B (increasing the initial delay on the liveness probe) is the older, less flexible approach and can result in longer recovery times if the container truly becomes unhealthy later. Option C (increasing CPU limit) does not address the probe timing issue. Option D (readiness probe) controls whether traffic is routed to the pod but does not prevent the liveness probe from killing it during slow startup.
Topics
Community Discussion
No community discussion yet for this question.