Deployment Basics
In Kubernetes, which object is commonly used to manage rolling updates of application pods?
- Deployment
- Service
- ReplicaSet
- Pod
- Daemonset
Updating Applications
To update a container image in a Kubernetes Deployment, which command should you use?
- kubectl set image deployment/my-deployment mycontainer=myimage:2.0
- kubectl apply image deployment/my-deployment mycontainer:2.0
- kubectl update deployment/my-deployment --image=myimage:2.0
- kubectl set deployment image my-deployment mycontainer:2.0
- kubectl run deployment/my-deployment --image=myimage:2.0
Tracking Deployment Status
Which kubectl command do you use to check the status of a rollout for a deployment named 'web-app'?
- kubectl rollout status deployment/web-app
- kubectl status deployment/web-app
- kubectl get rollout web-app
- kubectl deployment rollout-status web-app
- kubectl describe rollout web-app
Rolling Back Deployments
You notice a failure after updating your deployment. What command would you use to roll back to the previous version?
- kubectl rollout undo deployment/my-deployment
- kubectl deployment rollback my-deployment
- kubectl set undo deployment/my-deployment
- kubectl rollback deployment/my-deployment
- kubectl delete rollout deployment/my-deployment
Deployment YAML
In a typical Deployment YAML, under which field do you specify the desired container image?
- spec.template.spec.containers.image
- spec.image
- metadata.spec.containers.image
- spec.template.image
- spec.containers.image
Scaling with Deployments
Which field in a Deployment YAML allows you to set the number of pod replicas?
- spec.replicas
- spec.count
- metadata.replicas
- spec.podCount
- deployment.replicas
Rollout Strategies
What is the default rollout strategy for Kubernetes Deployments?
- RollingUpdate
- Recreate
- BlueGreen
- Canary
- Immediate
Pausing u0026 Resuming
What kubectl command can pause a Deployment rollout to allow for multiple specification changes?
- kubectl rollout pause deployment/my-deployment
- kubectl pause deployment/my-deployment
- kubectl set pause deployment/my-deployment
- kubectl deployment pause my-deployment
- kubectl hold deployment/my-deployment
Revision History
How do you view the history of rollouts for a Deployment named 'api-server'?
- kubectl rollout history deployment/api-server
- kubectl history deployment/api-server
- kubectl describe deployment-history api-server
- kubectl deployment rollout-history api-server
- kubectl rollout list deployment/api-server
Deployment Selectors
Which field in the Deployment spec ensures that Pods created by it are managed correctly?
- spec.selector
- spec.matchLabels
- spec.podSelector
- spec.labelSelector
- metadata.selector