> For the complete documentation index, see [llms.txt](https://notes.mikaelsamvelian.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.mikaelsamvelian.com/devops-knowledge/containers/container-orchestration/kubernetes/workload-resources.md).

# Workload Resources

In Kubernetes, applications run in containers within Pods. To simplify management, higher-level workload objects are created using the Kubernetes API. Key workload types include the Deployment, the StatefulSet and the DaemonSet.

<figure><img src="/files/BzzYuNLcyn0Oclr98J15" alt=""><figcaption></figcaption></figure>

**Deployment** is the go-to resource for easily deploying stateless applications in a Kubernetes cluster. It uses a ReplicaSet for straightforward version rollbacks. The pod naming convention is `<deployment-name>`-`<replicaset-id>`-`<pod-id>`.

**StatefulSet**, introduced in Kubernetes 1.9, is designed for stable hosting of stateful applications. It independently manages pods and requires a headless service for network identification and DNS resolution.&#x20;

Pods in a StatefulSet have unique names like `<Statefulset-name>`-0, `<Statefulset-name>`-1, and each has its own persistence volume claim. StatefulSets are ideal for stateful applications, such as databases, where replica identification and graceful upgrades are essential.
