What is a Deployment and how does it manage Pods?easy
Answer
A Deployment declares the desired state (image, replicas, update strategy). Kubernetes continuously reconciles actual state to match - creating, updating, or deleting Pods as needed.
Explanation
Deployments manage a ReplicaSet which manages the actual Pods. Rolling updates create new ReplicaSet Pods while scaling down old ones - zero downtime. maxSurge and maxUnavailable control the update speed and availability. kubectl rollout undo rolls back to the previous ReplicaSet. StatefulSets extend Deployments for stateful applications needing stable network identity and ordered rolling updates.
Follow-upWhat is the difference between a Deployment and a StatefulSet?