Replicas & ReplicaSets
- A replica is a nothing more than a copy. If you have your application hosted on a pod, and you want more instances of the application to be up to serve increased traffic, you can create more replicas of the pod.
- As the name suggests, all replicas of a pod are identical to each other
- Replicas of a pod are managed using replica sets
- A replica set is used to maintain a fixed number of copies of a pod in the Kubernetes cluster
- The pods that are managed by the replica set are selected using "selectors"
- Any pod that is selected by the selector of a replica set will now be managed by the replica set
- Pods will be deleted or created to match the number of replicas specified the yaml file or the cli command
Deployments
- Deployments are a way to manage stateless applications hosted on pods/replica sets
- They are great for scaling up/down stateless applications
- Deployments provide way to perform upgrades. Eg: If you want to change the underlying image in the pod, you can use various update techniques to achieve that
Top comments (0)