Kubernetes Deployments: Updates u0026 Rollouts Quiz Quiz

  1. Deployment Basics

    In Kubernetes, which object is commonly used to manage rolling updates of application pods?

    1. Deployment
    2. Service
    3. ReplicaSet
    4. Pod
    5. Daemonset
  2. Updating Applications

    To update a container image in a Kubernetes Deployment, which command should you use?

    1. kubectl set image deployment/my-deployment mycontainer=myimage:2.0
    2. kubectl apply image deployment/my-deployment mycontainer:2.0
    3. kubectl update deployment/my-deployment --image=myimage:2.0
    4. kubectl set deployment image my-deployment mycontainer:2.0
    5. kubectl run deployment/my-deployment --image=myimage:2.0
  3. Tracking Deployment Status

    Which kubectl command do you use to check the status of a rollout for a deployment named 'web-app'?

    1. kubectl rollout status deployment/web-app
    2. kubectl status deployment/web-app
    3. kubectl get rollout web-app
    4. kubectl deployment rollout-status web-app
    5. kubectl describe rollout web-app
  4. Rolling Back Deployments

    You notice a failure after updating your deployment. What command would you use to roll back to the previous version?

    1. kubectl rollout undo deployment/my-deployment
    2. kubectl deployment rollback my-deployment
    3. kubectl set undo deployment/my-deployment
    4. kubectl rollback deployment/my-deployment
    5. kubectl delete rollout deployment/my-deployment
  5. Deployment YAML

    In a typical Deployment YAML, under which field do you specify the desired container image?

    1. spec.template.spec.containers.image
    2. spec.image
    3. metadata.spec.containers.image
    4. spec.template.image
    5. spec.containers.image
  6. Scaling with Deployments

    Which field in a Deployment YAML allows you to set the number of pod replicas?

    1. spec.replicas
    2. spec.count
    3. metadata.replicas
    4. spec.podCount
    5. deployment.replicas
  7. Rollout Strategies

    What is the default rollout strategy for Kubernetes Deployments?

    1. RollingUpdate
    2. Recreate
    3. BlueGreen
    4. Canary
    5. Immediate
  8. Pausing u0026 Resuming

    What kubectl command can pause a Deployment rollout to allow for multiple specification changes?

    1. kubectl rollout pause deployment/my-deployment
    2. kubectl pause deployment/my-deployment
    3. kubectl set pause deployment/my-deployment
    4. kubectl deployment pause my-deployment
    5. kubectl hold deployment/my-deployment
  9. Revision History

    How do you view the history of rollouts for a Deployment named 'api-server'?

    1. kubectl rollout history deployment/api-server
    2. kubectl history deployment/api-server
    3. kubectl describe deployment-history api-server
    4. kubectl deployment rollout-history api-server
    5. kubectl rollout list deployment/api-server
  10. Deployment Selectors

    Which field in the Deployment spec ensures that Pods created by it are managed correctly?

    1. spec.selector
    2. spec.matchLabels
    3. spec.podSelector
    4. spec.labelSelector
    5. metadata.selector