Edvin Cekani
Edvin Cekani
Software Developer
Edvin Cekani

Blog

Kubernetes ReplicaSet

Kubernetes ReplicaSet

Controllers are the brain about Kubernetes, they are the processes that monitor Kubernetes objects and respond accordingly.

In this post we will discuss about one controller in particular and that is the replication controller. So what is a replication controller and why do we need a replication controller ?

Lets imagine one scenario where we have one single POD running out application, if for some reason our application crashes and the POD fails, users will no longer access our application.

To pervent users from loosing access to our application we would like to have more than one POD or instance running at the same time. That way if one instance fails, we have the application running on the other one. The replication controller helps us run multiple instances of the same POD in the Kubernetes cluster, thus providing high availability.

Even if you have a single POD, the replication controller can help by automatically bring a new one when the existing one fails.The replication controller esures thet the specified number of pods run at all time even if it is 1 or 100.

Another reason we need replication controller is to create multiple pods and share the load across them. For example, we have a single pod serving to a set of users, when the number of users increases, we deploy aditional POD to balance the load across the two PODs. If the demand further increases and if we were to run out of resources on the first node, we could deploy aditional PODs across other nodes in the cluster. As you can see the replication controller spans accross multiple nodes in the cluster.

Free Web Hosting