☸️Kubernetes Deployment
Also known as K8s Deployment, Deployment (Kubernetes), ReplicaSet
A Kubernetes setting that keeps a set number of pods up. It swaps them in safely.
Think of it like
It is like a coach who keeps eleven players on the field. If one gets hurt, a new one runs on.
Example
Lucy's deployment asks for 3 copies of the shop app. She changes the image to version 2.4, and the pods are swapped one by one with no downtime.
Why it matters
It is how most apps run in Kubernetes. You get self-healing and safe updates with no extra code.
Definition
Example code
console
$ kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
nginx-deployment 3/3 3 3 18sCommon mistake
Key takeaways
- 1A set count. It keeps the number of copies you asked for.
- 2Rolling updates. New pods replace old ones a few at a time.
- 3Easy rollback. A bad version can be undone in one step.