PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #82
You have an application that runs in Google Kubernetes Engine (GKE). The application consists of several microservices that are deployed to GKE by using Deployments and Services. One of the microservi
The correct answer is B. Add a HTTP liveness probe to the microservice's deployment.. An HTTP liveness probe is the Kubernetes-native solution for detecting and automatically recovering from an unhealthy pod state. Configuring a liveness probe that targets an endpoint which reflects the pod's health causes Kubernetes to automatically restart any pod that starts re
Question
Options
- ACreate a cron job to terminate any Pods that have been running for more than five hours.
- BAdd a HTTP liveness probe to the microservice's deployment.
- CMonitor the Pods, and terminate any Pods that have been running for more than five hours.
- DConfigure an alert to notify you whenever a Pod returns 403 errors.
How the community answered
(29 responses)- A3% (1)
- B72% (21)
- C10% (3)
- D14% (4)
Explanation
An HTTP liveness probe is the Kubernetes-native solution for detecting and automatically recovering from an unhealthy pod state. Configuring a liveness probe that targets an endpoint which reflects the pod's health causes Kubernetes to automatically restart any pod that starts returning failure responses (such as 403s after five hours), resetting the runtime and restoring service. This requires minimal steps and no ongoing manual intervention. Option A (cron job) and C (manual monitoring) both require extra infrastructure or human effort. Option D (alert) only notifies - it does not automatically remediate the issue.
Topics
Community Discussion
No community discussion yet for this question.