Deployments
Why Deployments
A Deployment owns a ReplicaSet, which owns pods. If a pod disappears, the controller creates a replacement.
Create a Deployment
Imperative example for practice:
kubectl create deployment hello --image=nginx:1.27
kubectl get deployments
kubectl get pods
See the ownership chain
Describe the Deployment and list ReplicaSets.
kubectl describe deployment hello
kubectl get rs
Delete the workload
Deleting the Deployment removes its pods.
kubectl delete deployment hello
Comments
One comment per signed-in account. Comments are saved with this page’s URL.