Google Professional Cloud Developer Question 214
Select 3Google Cloud PlatformYou are developing a microservices-based application on Google Cloud. You need to deploy a new containerized service and ensure that its logs can be monitored in real time. Which combination of tools can you use to deploy the service and view its logs?
- A
Use the Google Cloud Console to deploy the container image to Cloud Run and view the logs in the Logs Explorer.
- B
Use the Google Cloud SDK to deploy the container image to Google Kubernetes Engine (GKE) and view the logs in Cloud Shell using
gcloud logging read. - C
Use Cloud Shell to deploy the container image to Cloud Functions and view logs in the Google Cloud Console.
- D
Use Google Cloud Console to deploy the container image to Compute Engine and view the logs in the VM's serial console.
- E
Use the Google Cloud SDK to deploy the container image to App Engine and view logs in the Logs Explorer.
Show answer and explanation
Correct answers: A, B, E
Explanation
To manage containerized services in Google Cloud, you can use a combination of the Google Cloud Console, Google Cloud SDK, and Cloud Shell. Deployment options like Cloud Run, GKE, and App Engine are suitable for containers and support real-time log monitoring via Logs Explorer or gcloud logging read. Cloud Functions and Compute Engine are not optimal choices for containerized workloads, as they are designed for specific use cases like serverless functions or VM-based workloads.
- A. Correct.
Correct: Google Cloud Console allows you to deploy container images to Cloud Run, and Logs Explorer provides an interface to view logs in real time.
- B. Correct.
Correct: The Google Cloud SDK can be used with GKE to deploy workloads, and logs can be accessed using
gcloud logging readfrom Cloud Shell. - C. Incorrect.
Incorrect: Cloud Functions is not designed for deploying containerized services; it is typically used for serverless function execution.
- D. Incorrect.
Incorrect: While you can deploy to Compute Engine, viewing logs in the VM's serial console is not suitable for real-time log monitoring.
- E. Correct.
Correct: The Google Cloud SDK supports App Engine deployments, and logs can be accessed via the Logs Explorer for real-time monitoring.