When describing the Kubernetes architecture we often hear the term pods. Pods group the containers logically in a single cluster. These logically grouped containers are then controlled by the controllers. Controllers are responsible for monitoring and maintaining the state of the Kubernetes resources and any changes required in the cluster are requested through controllers.
Similarly, workload refers to the application running in one or more Kubernetes pods. These workloads together with controllers run the application by making sure that the correct pods are running.
Let’s look at a few use cases of workload resources:
- ReplicaSets and Deployments for stateless applications like API gateways is a good use case. In deployment, ReplicaSets are managed by declarative statements.
- StatefulSets can be used for stateful applications that require multiple pods and server leaders such as RabbitMQ messaging service.
- For node monitoring and log collection, DaemonSets are used. Popular log collection stacks like Fluentd, Kibana, and Elasticsearch can be used for log collection
- CronJobs and Jobs can be used for applications that require scheduled runs such as a batch pipeline to update databases.
- Custom resources provide support for managing and updating new resources. For instance, adding a certificate manager to enable HTTPS and TLS support.