Kubernetes Workload Resources: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 7: Line 7:
From the simplest to the most complex ones, the workload resources are Jobs, CronJobs, ReplicaSets, Deployments, DaemonSets and StatefulSets.
From the simplest to the most complex ones, the workload resources are Jobs, CronJobs, ReplicaSets, Deployments, DaemonSets and StatefulSets.


[[Kubernetes_Job#Overview|Jobs]] and CronJobs are aimed mainly at running individual pods, as part of one-off or repeated executions.
[[Kubernetes_Job#Overview|Jobs]] and [[Kubernetes_CronJob#Overview|CronJobs]] are aimed mainly at running individual pods, as part of one-off or repeated executions.


A [[Kubernetes_ReplicaSet|ReplicaSet]] is a workload resource aimed at maintaining a stable set of replica Pods running at any given time, guaranteeing the availability of a specified number of identical Pods.  
A [[Kubernetes_ReplicaSet|ReplicaSet]] is a workload resource aimed at maintaining a stable set of replica Pods running at any given time, guaranteeing the availability of a specified number of identical Pods.  

Revision as of 00:13, 13 July 2023

Internal

Overview

Workload resources exist to create and manage Pods, which should not usually be created directly. Various workload resources implement different pod operational patterns. The pod-managing resources described here are some times referred to as higher-level pod controllers or "templated controllers".

From the simplest to the most complex ones, the workload resources are Jobs, CronJobs, ReplicaSets, Deployments, DaemonSets and StatefulSets.

Jobs and CronJobs are aimed mainly at running individual pods, as part of one-off or repeated executions.

A ReplicaSet is a workload resource aimed at maintaining a stable set of replica Pods running at any given time, guaranteeing the availability of a specified number of identical Pods.

The Deployment is a resource that delegates to a ReplicaSet.

These controllers are part of and supervised by the controller manager.

Describe the relationship between pod, deployment, ReplicaSet and workload resources. Which one are controllers and which are not?

Controller

TODO: https://kubernetes.io/docs/concepts/workloads/pods/#pods-and-controllers


A workload resource has an associated controller. The controller handles replication, rollout and automatic healing in case of pod failure. For example if a node fails, a controller notices that the pods on that node have stopped working and creates replacement pods, which are scheduled on healthy nodes.

Workload resources:

To Distribute

ReplicationController

ReplicationController