Kubernetes and Cloud Native Associate (KCNA)Kubernetes FundamentalsMedium
A DevOps engineer is configuring a Kubernetes Deployment for a new application. They want to ensure that the application has a minimum of 3 running instances at all times, even if a node fails. Additionally, they need to update the application periodically without any downtime. Which Kubernetes object is primarily responsible for managing the number of running Pod replicas and enabling rolling updates?
- ADeployment
- BIngress
- CService
- DReplicaSet
Show answer & explanationAnswer & explanation
Correct answer: A. Deployment
A Deployment is a higher-level object that manages ReplicaSets, which in turn manage Pods. It provides declarative updates for Pods and ReplicaSets, enabling features like rolling updates and rollback, while ensuring a desired number of replicas.
Why the other options are wrong
- B. Ingress manages external access to services within the cluster, typically for HTTP/HTTPS traffic.
- C. A Service provides network access to a set of Pods, but doesn't manage their lifecycle or updates.
- D. A ReplicaSet ensures a specified number of Pod replicas are running, but it does not directly manage updates or rollbacks.
Kubernetes Deployment
A Kubernetes Deployment provides declarative updates for Pods and ReplicaSets. It manages the desired state of your application, ensuring a specified number of Pods are running and enabling features like rolling updates and rollbacks.
- Manages ReplicaSets, which in turn manage Pods.
- Enables rolling updates and rollbacks without downtime.
- Ensures a desired number of replicas are always running.
Memory trick: Deployments Deploy and Develop