What is a Deployment?
It is a controller that maintains the desired state of ReplicaSets, which in turn manage Pods
What is the default update strategy for a Deployment?
RollingUpdate.
Which strategy kills all old pods before creating new ones?
Recreate.
How do you roll back a deployment to the previous version?
kubectl rollout undo deployment/<deployment-name>
How do you scale a deployment named ‘webapp’ to 5 replicas?
kubectl scale deployment webapp –replicas=5
What is a Blue/Green deployment?
A deployment strategy where you have two identical environments; one is ‘live’ and one is ‘idle’.
What is a Canary deployment?
Routing a small percentage of traffic to a new version of the app to test it.
What happens if you set ‘maxUnavailable: 0’ and ‘maxSurge: 1’ during a rollout?
Azure will always ensure 100% capacity is maintained by creating a new pod before killing an old one.
How do you check the specific changes made in revision 3 of a deployment?
kubectl rollout history deployment <name> --revision=3
How do you temporarily stop a rolling update to verify a change?
kubectl rollout pause deployment <name>
Which command allows you to resume a paused deployment?
kubectl rollout resume deployment <name>
How do you record the ‘why’ or ‘what’ of a deployment change since –record is deprecated?
Use the ‘kubernetes.io/change-cause’ annotation in the metadata.
If a Deployment fails to complete within 10 minutes; which parameter controls this timeout?
‘progressDeadlineSeconds’ (default is 600s).
Which Control Plane component is responsible for noticing when a replica dies and telling the API to start a new one?
The Kube-Controller-Manager.
If you scale a deployment but no new pods are created, which component’s logs should you check first?
The Kube-Controller-Manager.
What is the difference between a Deployment and a StatefulSet regarding pod naming?
Deployments use random hashes; StatefulSets use ordinal indexes (pod-0, pod-1) and maintain persistent identities.
How do you view the revision history of a deployment?
kubectl rollout history deployment/<name></name>
How do you roll back a deployment to a specific revision number?
kubectl rollout undo deployment/<name> --to-revision=<number></number></name>
How do you check the real-time progress of a rollback?
kubectl rollout status deployment/<name></name>