I am new to kubernetes and microservices, there are 2 objects, Deployments and ReplicaSet.
I can't wrap my head around even after reading its documentations and other articles.
If we have Deployments
, why do we need a ReplicaSet
because you can specify the replicaset in the Deployment
. And when i delete the pods, new pods will be spawned based on the replicaset, just like the deployments.
Like what is the actual use-case where we only need ReplicaSet
but not Deployments
Deployment works one level above ReplicaSet object. Deployment is recommended for application services.
With deployment you should be able to do rolling upgrade or rollback. You can update image from v1 to v2.
With ReplicaSet you define number of replicas you want to run. For a particular service. You would have those many replicas running.
deployment is for stateless application and we can update our application by it. by replicaset we can not update our application easily and it has a lot of work to do to update our application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With