Kubernetes Controllers Comparison Table

Nexmoe June 26, 2025
This article is an AI translation and may contain semantic inaccuracies.

In Kubernetes, controllers manage Pod lifecycles and are core workload components. Each controller has its own use cases and behavior. Below is a detailed comparison of the main controller types.

Controller Comparison Table

DimensionDeploymentStatefulSetDaemonSetJob
Primary useManage stateless apps (web services, APIs)Manage stateful apps (databases, message queues)Run a daemon on every node (monitoring, logging)Run one‑off batch tasks
App stateStatelessStatefulUsually statelessUsually stateless
Pod identityNo fixed identity, replaceableEach Pod keeps a stable, permanent IDBound to nodeTemporary identity
StorageNo persistent storage needed, can use ephemeral volumesRequires stable persistent storage (PV/PVC, dynamic or static)Optional, usually HostPath or ephemeralUsually not needed, mount volumes if required
Deploy & scaleUnordered deploy, supports horizontal scalingOrdered, one‑by‑one deploy/scale/delete (0,1,2…)Auto‑deploys to new nodes, scales with node countControls parallelism and completions, runs to completion
Update strategyRollingUpdate, Recreate; configurable maxSurge/maxUnavailableRollingUpdate, supports partition or OnDeleteRollingUpdate or OnDeleteNot applicable; Pod template immutable after creation
RollbackAutomatic rollback to history (revisionHistoryLimit)Not directly; manual or external toolsSupports rollbackNot applicable
Failure handlingAuto restart/recreate failed PodsAt most one Pod with same identity runs; manual recovery neededNode failure removes Pod; recreated on node recovery/new nodeRetry on failure (backoffLimit)
Key featuresDeclarative updates, versioning/rollback, pause/resumeOrdered operations, stable network/storage, Headless ServiceNode affinity, auto‑deploy on new nodes, tolerates taintsRetries, parallel execution, optional TTL cleanup
ExamplesNginx, Tomcat, NodeJS appsMySQL, Redis, Kafka, ETCDFluentd, Prometheus Node Exporter, network pluginsData migration, batch compute, backups, ETL
Best practiceDefault choice for most stateless appsUse only when you need stable identity or orderingFor infra and node‑level servicesFor tasks that terminate (not daemons)

Controller Hierarchy

Deployment → ReplicaSet → Pod: This is the most common pattern for managing stateless apps. Users operate the Deployment object to declare desired state (image version, replicas, etc.). Deployment doesn’t manage Pods directly — it creates and manages ReplicaSet. When the Deployment is updated, it creates a new ReplicaSet and migrates Pods from old to new in a controlled manner (rolling update). This enables versioning and rollback, while ReplicaSet focuses on maintaining a specific number of Pod replicas. In other words, Deployment gives ReplicaSet declarative updates and history management.

CronJob → Job → Pod: CronJob schedules Job objects according to a cron expression. Job executes one‑off tasks by creating one or more Pods and ensuring they complete successfully. CronJob doesn’t manage Pods directly; it only triggers Jobs at the right time. This layering separates scheduling from execution.

StatefulSet and DaemonSet manage Pods directly — they don’t have an intermediate controller because their Pod management logic (stable identity, node binding) is their core capability.

References