KCNA · Question #66
What do Deployments and StatefulSets have in common?
The correct answer is A. They manage Pods that are based on an identical container spec. Both Deployments and StatefulSets manage a set of Pods that are created from an identical PodTemplate (container spec).
Question
What do Deployments and StatefulSets have in common?
Options
- AThey manage Pods that are based on an identical container spec.
- BThey support the OnDelete update strategy.
- CThey support an ordered, graceful deployment and scaling.
- DThey maintain a sticky identity for each of their Pods.
How the community answered
(36 responses)- A86% (31)
- B3% (1)
- C3% (1)
- D8% (3)
Why each option
Both Deployments and StatefulSets manage a set of Pods that are created from an identical `PodTemplate` (container spec).
Both Deployments and StatefulSets are controllers that manage a group of Pods, and the definition for these Pods (including the container images, ports, environment variables, etc.) comes from a common `PodTemplateSpec` within their respective configurations.
While StatefulSets support the `OnDelete` update strategy, Deployments primarily use `RollingUpdate` as their default and generally preferred strategy for graceful updates.
StatefulSets provide ordered, graceful deployment and scaling, especially important for stateful applications, but Deployments typically aim for speed and availability without strict ordering guarantees for individual Pods.
StatefulSets maintain a sticky, persistent identity for each of their Pods (stable network identities, persistent storage), whereas Pods managed by Deployments are largely interchangeable and stateless.
Concept tested: Kubernetes Deployment vs StatefulSet similarities
Source: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#pod-template
Topics
Community Discussion
No community discussion yet for this question.