2V0-71.23 Question 29
Single answerAn organization is using VMware Tanzu Kubernetes Grid (TKG) to deploy and manage Kubernetes clusters. The development team plans to deploy a microservices-based application consisting of multiple pods, services, and ConfigMaps. They also want to ensure that the application automatically rolls back if a deployment fails. Which Kubernetes concept should they use to achieve this?
- A
ReplicaSet
- B
Deployment
- C
StatefulSet
- D
Job
Show answer and explanation
Correct answer: B
Explanation
Deployments are the recommended Kubernetes resource for managing stateless applications. They allow for easy updates, scaling, and rollback functionality. By using a Deployment, the development team can ensure that their microservices-based application benefits from features like rolling updates to minimize downtime and automatic rollbacks in case of a failure during deployment.
- A. Incorrect.
ReplicaSet ensures that a specified number of pod replicas are running at any given time but does not support rolling updates or rollbacks.
- B. Correct.
Deployment is the correct concept as it provides advanced features such as rolling updates and rollbacks to manage the lifecycle of an application.
- C. Incorrect.
StatefulSet is used for managing stateful applications and provides guarantees about the ordering and uniqueness of pods but does not focus on rollbacks or rolling updates in the same way as Deployments.
- D. Incorrect.
Job is used for running one-off or batch tasks and does not manage long-running applications or provide rollback functionality.