Google Professional Cloud Developer Question 216
Select 4Google Cloud PlatformYou are a developer working on a Google Cloud project. You need to deploy a containerized application to Google Kubernetes Engine (GKE). However, you want to first verify that the application deploys successfully and runs as expected. Which of the following methods can you use to deploy and verify your application directly from your development environment?
- A
Use the Google Cloud SDK to push the container image to Container Registry and create a GKE deployment using
kubectlcommands. - B
Use the Google Cloud console to upload the container image, create a GKE deployment, and monitor the deployment logs.
- C
Use Cloud Shell to execute
gcloudcommands to build, push, and deploy the container image to GKE. - D
Manually transfer the container image to each GKE node and start the application using Docker commands.
- E
Use a combination of the Google Cloud SDK and Cloud Build to automate the process of building, pushing, and deploying the container image to GKE.
Show answer and explanation
Correct answers: A, B, C, E
Explanation
There are multiple tools and methods available in Google Cloud to deploy containerized applications to GKE. The Google Cloud SDK, console, and Cloud Shell provide streamlined ways to deploy and verify applications. Additionally, Cloud Build can automate the process, ensuring efficient and repeatable deployments. However, manually transferring container images to GKE nodes is not a valid or scalable approach, as GKE manages container orchestration automatically.
- A. Correct.
Correct. The Google Cloud SDK provides the necessary tools (
gcloudandkubectl) to push container images to Container Registry and deploy them to GKE. - B. Correct.
Correct. The Google Cloud console allows you to manage container images, create GKE deployments, and monitor logs for verification.
- C. Correct.
Correct. Cloud Shell provides a pre-configured development environment where you can run
gcloudcommands to deploy and verify your application. - D. Incorrect.
Incorrect. Manually transferring the container image to GKE nodes is not a recommended or scalable method for deploying applications on GKE.
- E. Correct.
Correct. Using a combination of the Google Cloud SDK and Cloud Build allows you to automate the build, push, and deploy pipeline, making it an efficient solution for deploying applications to GKE.