Member-only story
In this blog, we will explore the concept of Kubernetes Controllers and how to use them to create replicated Deployments. We will also explore which controller should we use for a specific use case.
Prerequisite:
- Functional Kubernetes Cluster configured
- Kubernetes’ command-line tool, kubectl, which is the command-line interface for running commands against Kubernetes clusters.
- Clone this git repo for all the yaml files which we will be using in this blog
There are different kinds of controllers
- ReplicaSets,
- Deployments,
- DaemonSets
- StatefulSets
- Jobs
Why controllers ?
In my previous blog we have seen how to create a pod and manage its lifecycle manually.
There are various reasons you want to use controllers such as
- Create more than one replica of your pods so that when one pod is down, application can still run on the different pod
- Load Balance across different pods so that an end user will not see any slowness in their application.