2V0-71.23 Question 14
Select 3You are managing a Kubernetes cluster and need to deploy a simple stateless web application. The application should be accessible via a stable endpoint and must scale automatically based on resource usage. Which combination of Kubernetes logical objects should you use to achieve this?
- A
Deployment
- B
Service
- C
PersistentVolume
- D
HorizontalPodAutoscaler
- E
ConfigMap
Show answer and explanation
Correct answers: A, B, D
Explanation
To deploy a stateless web application that is accessible via a stable endpoint and capable of scaling automatically, you need a Deployment to manage the Pods, a Service to provide a stable network endpoint, and a HorizontalPodAutoscaler to handle scaling. PersistentVolume is unnecessary for stateless applications, and ConfigMap is optional for this scenario.
- A. Correct.
A Deployment is used to manage stateless applications, ensuring that the desired number of Pods are running and enabling rolling updates.
- B. Correct.
A Service provides stable network access to the Pods, allowing external or internal traffic to be routed to the application.
- C. Incorrect.
A PersistentVolume is used for managing persistent storage, which is not required for a stateless application.
- D. Correct.
A HorizontalPodAutoscaler automatically adjusts the number of Pods in response to resource usage, ensuring scalability.
- E. Incorrect.
A ConfigMap allows you to inject configuration data into your application, but it is not required for basic deployment, accessibility, or scaling.