Why Deployments and not Pods?
A deployment declaration in Kubernetes allows to do application deployments and updates.
When using deployment object, you can define state of your application.
Kubernetes makes sure that the clusters match the desired state.
Just using replication controller or replication set might be cumbersome to deploy applications.
Deployment Object is easier to use and gives more possibilities.
With a deployment object you can:
a)Create a deployment(e.g. deploying an app)
b) Update a deployment(e.g. deploying a new version)
c) Do rolling updates(zero downtime deployments).
d)Roll back to a previous version
e)Pause/Resume a deployment(e.g. to roll -out to only a certain percentage)
f)Used in production environment.
According to Kubernetes official documentation:
A Pod (as in a pod of whales or pea pod) is a group of one or more containers (such as Docker containers), with shared storage/network, and a specification for how to run the containers.
Also, Pods aren’t intended to be treated as durable entities. They won’t survive scheduling failures, node failures, or other evictions, such as due to lack of resources, or in the case of node maintenance.
Pods aren’t intended to be treated as durable entities. They won’t survive scheduling failures, node failures, or other evictions, such as due to lack of resources, or in the case of node maintenance.