
Answer-first summary for fast verification
Answer: Use `kubectl set image deployment/echo-deployment`
The correct answer is **C** because the image can be directly updated using the `kubectl` command, and Kubernetes Engine performs a rolling update. This method allows for updating the application with minimal downtime. - **Option A** is incorrect because the service does not map to an image, and deleting and recreating the service would not update the application's image. - **Option B** is incorrect because the underlying managed instance groups are managed by Kubernetes, and manual intervention is not required. - **Option D** is incorrect because deleting and recreating the deployment would result in downtime, contrary to the requirement of minimal downtime. For more details, refer to the [GCP documentation on Kubernetes Engine Rolling updates](https://cloud.google.com/kubernetes-engine/docs/how-to/rolling-updates).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You have an application deployed on 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
Update the service yaml file with the new container image. Use kubectl delete service/echoservice and kubectl create –f
B
Use the rolling update functionality of the Instance Group behind the Kubernetes cluster
C
Use kubectl set image deployment/echo-deployment
D
Update the deployment yaml file with the new container image. Use kubectl delete deployment/echo-deployment and kubectl create –f
No comments yet.