A workload is an application running on Kubernetes. Whether your workload is a single component or several that work together, on Kubernetes you run it inside a set of Pods. In Kubernetes, a Pod represents a set of running containers on your cluster.
A Pod has a defined lifecycle. For example, once a Pod is running in your cluster then a critical failure on the node where that Pod is running means that all the Pods on that node fail. Kubernetes treats that level of failure as final: you would need to create a new Pod even if the node later recovers.
However, to make life considerably easier, you don't need to manage each Pod directly. Instead, you can use workload resources that manage a set of Pods on your behalf. These resources configure controllers that make sure the right number of the right kind of Pod are running, to match the state you specified.
Those workload resources include:
- Deployment and ReplicaSet (replacing the legacy resource ReplicationController);
- DaemonSet for running Pods that provide node-local facilities, such as a storage driver or network plugin;
- Job and CronJob for tasks that run to completion.
There are also two supporting concepts that you might find relevant:
- Garbage collection tidies up objects from your cluster after their owning resource has been removed.
- The time-to-live after finished controller removes Jobs once a defined time has passed since they completed.
As well as reading about each resource, you can learn about specific tasks that relate to them:
- Run a stateless application using a Deployment
- Run a stateful application either as a single instance or as a replicated set
- Run Automated Tasks with a CronJob
You can also visit Configuration to learn about Kubernetes' mechanisms for separating code from configuration.