Which Objects in Kubernetes

For a beginner Kubernetes (k8s) user the variety of objects that you should be aware of can be overwhelming a little bit. In this article I would like to give you an overview of pod controllers object.

21 April 2020

But what is the pod? This is a most elementary object. It defines, how our singular work unit will look like. It contains definitions of container(s), configuration, secrets, volumes, health checks definition. Pod can be deployed directly to the cluster. But never (or hardly ever) do it. There are pod controller that you can take advantage of. Here’s a basic overview of  most common used.


When to usePersistent Volume SupportScaling supportSelf healingUpdating Strategies
DeploymentStateless ApplicationsSame volume for all replicasYesYesRolling Updates (order of recreation is not guaranteed), Recreate (kills all pods before creating new ones)
StatefulSetStateful ApplicationsEach replica has its own volumeYesYesRolling Update (order of recreation is guaranteed),


DaemonSetNeed to install application on each kubernetes nodeYes (there is only one replica)NoYesRolling Update

In addition to the above, you can take advantage of TTL Controller, Job, CronJob, GarbageCollection. 

Being honest, things are a little bit more complicated than described. There are some intermediate object in hierarchy (like ReplicationController), but it should not be used directly as well. You should also be aware that more sophisticated strategies of updating (canary, blue green) workload can be achieved by using some external tool (Istio, Spinnaker, community based canary operators and many others).


Your software development experts

We’re a team of experienced and skilled software developers – and people you’ll enjoy working with.

Start Your Projectadd