Topic 1 Question 20
Your application is deployed in a Google Kubernetes Engine (GKE) cluster. When a new version of your application is released, your CI/CD tool updates the spec.template.spec.containers[0].image value to reference the Docker image of your new application version. When the Deployment object applies the change, you want to deploy at least 1 replica of the new version and maintain the previous replicas until the new replica is healthy. Which change should you make to the GKE Deployment object shown below?

Set the Deployment strategy to RollingUpdate with maxSurge set to 0, maxUnavailable set to 1.
Set the Deployment strategy to RollingUpdate with maxSurge set to 1, maxUnavailable set to 0.
Set the Deployment strategy to Recreate with maxSurge set to 0, maxUnavailable set to 1.
Set the Deployment strategy to Recreate with maxSurge set to 1, maxUnavailable set to 0.
ユーザの投票
コメント(13)
I will go with Option B for this.
RollingUpdate: New pods are added gradually, and old pods are terminated gradually Recreate: All old pods are terminated before any new pods are added
Question ask us to retain current version hence rolling update is better option here.
👍 17saurabh18052020/11/08https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-upgrades: "The simplest way to take advantage of surge upgrade is to configure maxSurge=1 maxUnavailable=0. This means that only 1 surge node can be added to the node pool during an upgrade so only 1 node will be upgraded at a time. This setting is superior to the existing upgrade configuration (maxSurge=0 maxUnavailable=1) because it speeds up Pod restarts during upgrades while progressing conservatively."
Answer is B
👍 6syu31svc2021/06/20Recreate can't be maintain previous replica. Answer must be B.
👍 3mishsanjay2021/02/06
シャッフルモード