Kubernetes and Cloud Native Associate (KCNA)Kubernetes FundamentalsEasy
A developer is preparing to deploy a new stateless application to a Kubernetes cluster. The application requires multiple identical instances for high availability and automatic scaling. Which Kubernetes object is most appropriate for defining and managing these instances?
- ADeployment
- BNamespace
- CService
- DPod
Show answer & explanationAnswer & explanation
Correct answer: A. Deployment
A Deployment is designed to manage a set of identical, stateless Pods, providing declarative updates, rollbacks, and self-healing capabilities, which aligns perfectly with the requirements for high availability and automatic scaling.
Why the other options are wrong
- B. A Namespace provides logical isolation within a cluster but doesn't define application instances or their management.
- C. A Service provides network access to a set of Pods but doesn't manage their lifecycle or scaling.
- D. A Pod is the smallest deployable unit but does not provide high availability or automatic scaling on its own.
Kubernetes Deployment
A Kubernetes object that provides declarative updates for Pods and ReplicaSets. It describes the desired state for a set of Pods, enabling automatic scaling, rollouts, and rollbacks.
- Manages stateless applications.
- Ensures a specified number of Pod replicas are running.
- Facilitates declarative updates and rollbacks.
Memory trick: Deployments Deploy Drones for Dynamic Delivery.