Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Professional Cloud Architect All Questions

View all questions & answers for the Professional Cloud Architect exam

Exam Professional Cloud Architect topic 1 question 56 discussion

Actual exam question from Google's Professional Cloud Architect
Question #: 56
Topic #: 1
[All Professional Cloud Architect Questions]

You have an application deployed on Google Kubernetes Engine using a Deployment named echo-deployment. The deployment is exposed using a Service called echo-service. You need to perform an update to the application with minimal downtime to the application. What should you do?

  • A. Use kubectl set image deployment/echo-deployment <new-image>
  • B. Use the rolling update functionality of the Instance Group behind the Kubernetes cluster
  • C. Update the deployment yaml file with the new container image. Use kubectl delete deployment/echo-deployment and kubectl create ג€"f <yaml-file>
  • D. Update the service yaml file which the new container image. Use kubectl delete service/echo-service and kubectl create ג€"f <yaml-file>
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
ffk
Highly Voted 5 years ago
A is correct. B is funny
upvoted 47 times
AmitAr
2 years, 6 months ago
B looks most sensible (not funny). rolling update is a deployment strategy, which will deploy on pods 1 by 1,. i.e. by the time first pod is getting newer version of application, other pods are running with older version... In this way, there will be no downtime of application.. which is real ask from this question. I recommend B
upvoted 6 times
monopfm
6 months, 3 weeks ago
Use the rolling update functionality of the >[Instance Group behind the Kubernetes cluster]<. It's not a rolling update of a Deployment. Read carefully.
upvoted 4 times
...
...
tartar
4 years, 3 months ago
A is ok
upvoted 14 times
...
kumarp6
4 years ago
Yes A is correct
upvoted 3 times
...
nitinz
3 years, 8 months ago
Only logical answer is A.
upvoted 1 times
...
...
jcmoranp
Highly Voted 5 years ago
Correct is A
upvoted 13 times
...
sim7243
Most Recent 1 week, 5 days ago
Selected Answer: A
option A
upvoted 1 times
...
isa_pr
4 months, 2 weeks ago
It's A. As per K8s documentation: To update the image of the application to version 2, use the set image subcommand, followed by the deployment name and the new image version: kubectl set image deployments/kubernetes-bootcamp kubernetes-bootcamp=docker.io/jocatalin/kubernetes-bootcamp:v2 The command notified the Deployment to use a different image for your app and initiated a rolling update." "
upvoted 2 times
...
kip21
10 months, 1 week ago
Option C - is the best option to perform an update to an application deployed on Google Kubernetes Engine with minimal downtime because it provides control over the update process, ensures high availability, and minimizes disruption. Rolling update functionality can also be used but requires more effort to implement. Option A and Option D may result in downtime if the new image is incompatible with the existing application.
upvoted 1 times
...
thewalker
1 year ago
A https://cloud.google.com/kubernetes-engine/docs/how-to/updating-apps#updating_an_application
upvoted 4 times
...
AdityaGupta
1 year, 1 month ago
Selected Answer: C
C. Update the deployment yaml file with the new container image. Use kubectl delete deployment/echo-deployment and kubectl create ג€"f <yaml-file> I agreed with omermahgoub with his explanation.
upvoted 1 times
cacharritos
10 months, 4 weeks ago
delete.. minimal downtime.. A is correct ^_^U
upvoted 1 times
...
...
vamgcp
1 year, 9 months ago
To perform an update to the application with minimal downtime on Google Kubernetes Engine (GKE), you can use a rolling update strategy, which involves updating the application incrementally, one pod at a time, while ensuring that the updated pods are functioning properly before updating the next set. Here's the general process: kubectl set image deployment/echo-deployment echo=<new_image_tag>
upvoted 4 times
...
roaming_panda
1 year, 10 months ago
Selected Answer: A
https://cloud.google.com/kubernetes-engine/docs/how-to/updating-apps says rolling updates and mentions same command . So 100 % A
upvoted 9 times
...
omermahgoub
1 year, 11 months ago
The correct answer is C: Update the deployment yaml file with the new container image. Use kubectl delete deployment/echo-deployment and kubectl create –f <yaml-file>. To perform an update to an application deployed on Google Kubernetes Engine with minimal downtime, you can follow these steps: Update the deployment yaml file with the new container image. Use the kubectl delete deployment/echo-deployment command to delete the existing deployment. Use the kubectl create –f <yaml-file> command to create a new deployment using the updated yaml file. This process, known as a rolling update, allows you to update your application with minimal downtime by replacing the old version of the application with the new version one pod at a time, while ensuring that there is always at least one pod available to serve traffic.
upvoted 3 times
omermahgoub
1 year, 11 months ago
using kubectl set image deployment/deployment <new-image> will not allow you to perform an update to the application with minimal downtime, even if the deployment is exposed using a Service. This command will update the image of the containers in the deployment, but it will not perform a rolling update. A rolling update allows you to update your application with minimal downtime by replacing the old version of the application with the new version one pod at a time, while ensuring that there is always at least one pod available to serve traffic. Without a rolling update, all of the pods in the deployment will be replaced at the same time, which may result in downtime for the application.
upvoted 1 times
...
omermahgoub
1 year, 11 months ago
Option A: Using kubectl set image deployment/echo-deployment <new-image> will update the image of the containers in the deployment, but it will not perform a rolling update and may result in downtime for the application. Option B: Using the rolling update functionality of the Instance Group behind the Kubernetes cluster is not a valid option, as the rolling update functionality is used to update the instances in the instance group, not the containers in a deployment. Option D: Updating the service yaml file with the new container image and using kubectl delete service/echo-service and kubectl create –f <yaml-file> is not a valid option, as the service is not responsible for running the application containers and updating the service will not update the application.
upvoted 3 times
CkWongCk
1 year, 10 months ago
A is correct, update template spec image in deployment yml will trigger rollout deploy
upvoted 1 times
...
_kartik_raj
1 year, 1 month ago
Answer is A, you are wrong as hell, if you delete deployment its obvious app will face downtime
upvoted 3 times
...
...
...
jasenmornin
1 year, 11 months ago
Selected Answer: A
I think A is correct: B. I don't understand the objective of this option. C and D. These are eliminated because they involve suffering a downtime when the resources are eliminated, so they are not fulfilling one of the requirements.
upvoted 3 times
...
markus_de
1 year, 11 months ago
Selected Answer: A
Example from official Kubernetes docu (for NGINX): kubectl set image deployment/nginx-deployment nginx=nginx:1.16.1 https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
upvoted 5 times
...
megumin
2 years ago
Selected Answer: A
ok for A
upvoted 2 times
...
AzureDP900
2 years, 1 month ago
A is right -- kubectl set image deployment/echo-deployment
upvoted 1 times
...
RitwickKumar
2 years, 3 months ago
Selected Answer: A
Source: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment Deployment ensures that only a certain number of Pods are down while they are being updated. By default, it ensures that at least 75% of the desired number of Pods are up (25% max unavailable). Deployment also ensures that only a certain number of Pods are created above the desired number of Pods. By default, it ensures that at most 125% of the desired number of Pods are up (25% max surge).
upvoted 8 times
...
Mikado211
2 years, 3 months ago
Selected Answer: A
Answer is A It can't be C, if you delete and recreate the deployment you will have a downtime between the deletion and the recreation.
upvoted 2 times
...
Ric350
2 years, 4 months ago
It's definitely A. See here under updating a deployment on the right hand side. https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...