KCNA · Question #165
Which API object is the recommended way to run a scalable, stateless application on your cluster?
The correct answer is B. Deployment. The Deployment API object is the recommended way to manage scalable, stateless applications in Kubernetes by providing declarative updates to Pods and ReplicaSets.
Question
Which API object is the recommended way to run a scalable, stateless application on your cluster?
Options
- AReplicaSet
- BDeployment
- CDaemonSet
- DPod
How the community answered
(36 responses)- A6% (2)
- B92% (33)
- D3% (1)
Why each option
The Deployment API object is the recommended way to manage scalable, stateless applications in Kubernetes by providing declarative updates to Pods and ReplicaSets.
A ReplicaSet ensures a specified number of Pod replicas are running at any given time but does not offer declarative updates or rollbacks, which Deployments provide.
A Deployment is a higher-level API object in Kubernetes that manages the declarative updates to Pods and ReplicaSets. It is ideal for stateless applications because it handles rolling updates, rollbacks, and scaling without retaining specific state per pod, making it suitable for horizontally scaling identical application instances.
A DaemonSet ensures that all (or some) nodes run a copy of a Pod, which is typically used for cluster-level infrastructure tasks, not for general scalable, stateless applications.
A Pod is the smallest deployable unit in Kubernetes and represents a single instance of a running process; it does not provide built-in scaling or update capabilities for an application.
Concept tested: Kubernetes Deployment for stateless applications
Source: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
Topics
Community Discussion
No community discussion yet for this question.