Avoid common pitfalls and use best practices
Pods are the fundamental Kubernetes building block for your container and now you hear that you shouldn't use Pods directly but through an abstraction such as a Deployment
. Why is that and what makes the difference?
If you deploy a Pod directly to your Kubernetes cluster, your container(s) will run, but nothing takes care of its lifecycle. Once a node goes down, capacity on the current node is needed, etc the Pod will get lost forever.
Thats the point where building blocks such as ReplicaSet
and Deployment
come into play. A ReplicaSet
acts as a supervisor to the Pods it watches and recreates Pods that don´t exist anymore.