Kubernetes
medium
Questão de Kubernetes #019e3a4f
Enunciado da Questão
Kubernetes
#kubernetes
#workloads
#deployment
#stateless
Médio
Which of the following resources helps in managing a stateless application workload on a Kubernetes cluster?
A
DaemonSet
B
StatefulSet
C
kubectl
D
Deployment
Correta
Explicação Oficial / Explicações da Comunidade
Summary
A Deployment is the correct resource for managing stateless application workloads in Kubernetes. It provides declarative updates, scaling, and self-healing for pods that do not require persistent state.
How It Works
A Deployment manages a ReplicaSet, which in turn manages the desired number of pod replicas. It supports rolling updates, rollbacks, and scaling. Stateless applications (e.g., web servers, APIs) can be freely replaced or scaled without data loss, making Deployment ideal.
Why the Correct Answer is Right
- Deployment: Designed for stateless workloads. It ensures the desired number of pods are running, handles updates without downtime, and can be scaled up/down easily. Pods are interchangeable and do not retain state.
Why the Incorrect Answers are Wrong
- DaemonSet: Ensures a copy of a pod runs on each node (or a subset). Used for node-level services like logging or monitoring, not for general stateless applications.
- StatefulSet: Used for stateful applications that require stable, unique network identifiers, persistent storage, and ordered deployment/scaling. Examples include databases and message queues. Not suitable for stateless workloads.
- kubectl: This is a command-line tool for interacting with Kubernetes clusters, not a resource for managing workloads. It is used to deploy and manage resources like Deployments, but itself is not a workload resource.