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?
Click on the arrows to vote for the correct answer
A. B. C. D.A.
To perform an update to an application deployed on Google Kubernetes Engine with minimal downtime, we need to use a deployment strategy that updates the application in a controlled manner while ensuring high availability and minimum disruption to the end-users.
Option A: Use kubectl set image deployment/echo-deployment <new-image>
This option involves updating the container image of the application using the kubectl set image command. This approach is a simple and quick way to update the application with minimal disruption. However, it does not provide any control over the update process, and there is a risk of downtime if the new image is incompatible with the existing application.
Option B: Use the rolling update functionality of the Instance Group behind the Kubernetes cluster
This option involves using the rolling update functionality of the Instance Group behind the Kubernetes cluster. The rolling update strategy involves updating the application one instance at a time while ensuring that the application remains available during the update process. This strategy provides control over the update process and ensures high availability, but it can be complex to implement and may require additional resources.
Option C: Update the deployment yaml file with the new container image. Use kubectl delete deployment/echo-deployment and kubectl create "f <yaml-file>
This option involves updating the deployment yaml file with the new container image and using the kubectl delete and create commands to apply the changes. This approach provides control over the update process, ensures high availability, and minimizes disruption. However, it requires more effort to implement than the other options.
Option D: Update the service yaml file which the new container image. Use kubectl delete service/echo-service and kubectl create "f <yaml-file>
This option involves updating the service yaml file with the new container image and using the kubectl delete and create commands to apply the changes. However, updating the service yaml file does not update the underlying deployment, and there is a risk of downtime if the new image is incompatible with the existing application.
Conclusion:
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.