why we need deployment if pods and replicas can be created using replica set?

7/31/2019

i have a doubt that, in both replicaset and deployment, replicas set and pods are created. then why we need deployment if pods and replicas can be created using replica set? Thanks

-- dushyant
kubernetes

1 Answer

7/31/2019

According Kubernetes documentation for Deployments, a

Deployment controller provides declarative updates for Pods and ReplicaSets. You describe a desired state in a Deployment, and the Deployment controller changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments.

whereby according documentation for ReplicaSet, a

ReplicaSet’s purpose is to maintain a stable set of replica Pods running at any given time. As such, it is often used to guarantee the availability of a specified number of identical Pods.

-- U880D
Source: StackOverflow