What is the primary purpose of a Deployment?
- To define network policies
- To manage storage volumes
- To manage ReplicaSets and ensure desired replicas of Pods ✓
- To directly run Pods
Correct answer: To manage ReplicaSets and ensure desired replicas of Pods
Option C is correct because a Kubernetes Deployment's primary purpose is to manage ReplicaSets, which in turn ensure a specified number of Pod replicas are running at all times, and it also provides declarative update strategies such as rolling updates and rollbacks. Option A is wrong because network policies are defined by NetworkPolicy objects in Kubernetes, not Deployments. Option B is wrong because storage volumes are managed through PersistentVolume, PersistentVolumeClaim, and StorageClass objects, not Deployments. Option D is wrong because while a Deployment indirectly results in Pods running via ReplicaSets, it does not directly run Pods; that is the role of lower-level controllers and the kubelet, with Deployments providing the higher-level lifecycle and scaling management.
Topic: · kubernetes, deployment, replicaset, pod management