zenkubernetes
Learning pathLessonsPractice studioGet the pack
Open practice studio ↗
Foundations
What is Kubernetes?
Setting up for k8s development
The Main Pillars of Kubernetes
Workload types
Creating our first cluster
Core Concepts
Deploying applications
Declaring services
Set up external access
ConfigMaps & Secrets
Debugging & Troubleshooting
Liveness & Readiness Probes
Scaling applications
Updating applications
Revision histories and rollbacks
Application projectPRO
Your application deployment projectBuild and containerize your applicationPackage and deploy with HelmVerify your deployment and hand it over
Troubleshooting practicePRO
Lab: the release that never startsLab: healthy Pods, unreachable applicationLab: configuration blocks startupLab: running does not mean readyLab: recover a failed release
Back at workPRO
Your workplace field guide
Lesson 04

Workload types

~3 min read

In Kubernetes, a workload is an application or service that you want to run on your cluster. Kubernetes provides several workload types that you can use to deploy and manage your applications:

Deployment

A Deployment is a workload type that manages a set of identical pods, ensuring that they are available and updated as needed. Deployments are commonly used for stateless applications, such as web servers, that can be scaled horizontally by adding or removing pods.

StatefulSet

A StatefulSet gives each Pod a stable identity and can associate it with persistent storage. This lets a replacement Pod reconnect to its predecessor's storage. Databases often use StatefulSets when their members need distinct names and volumes.

DaemonSet

A DaemonSet is a workload type that ensures that a set of pods runs on each node in the cluster. DaemonSets are commonly used for system-level daemons, such as log collectors or monitoring agents, that need to run on every node.

Job

A Job is a workload type that manages a set of pods that perform a specific task and then terminate. Jobs are commonly used for batch processing, such as running data analysis or machine learning jobs.

CronJob

A CronJob is a workload type that creates Jobs on a recurring schedule, similar to the cron utility in Unix. CronJobs are commonly used for periodic tasks such as database backups, report generation, or sending scheduled emails.

The course uses Deployments for the frontend and API. The optional local project uses a StatefulSet with persistent storage for PostgreSQL.

Previous← The Main Pillars of KubernetesNextCreating our first cluster →