Google Associate Cloud Engineer - Practice Test 2
Your application development team has developed Docker images for an application intended for deployment on Google Cloud. The team's primary goal is to avoid managing the underlying infrastructure for this application. You need to ensure the application can automatically scale to meet fluctuating demand. Which Google Cloud service combination should you choose?
Cloud Run is a fully managed serverless platform that automatically scales containerized applications, eliminating the need for infrastructure management. Artifact Registry is the recommended service for storing Docker images on Google Cloud. This combination directly addresses the team's requirements for no infrastructure management and automatic scaling.
A Google Cloud Compute Engine virtual machine is currently configured with 2 vCPUs and 4 GB of memory. The application running on this VM is experiencing out-of-memory errors. You need to upgrade the virtual machine to have 8 GB of memory while minimizing unnecessary resource changes. What is the most appropriate action to take?
To increase the memory of a Google Cloud VM, you must first stop the instance. After stopping, you can modify the machine type to either a custom type or a predefined type that offers the desired 8 GB of memory. Restarting the VM applies the new configuration. Option 4 is less ideal as 'n1-standard-8' significantly increases vCPUs beyond what's requested, potentially leading to overprovisioning and higher costs.
A company uses a Cloud SQL for MySQL database and needs to retain a consistent, auditable copy of the database at the end of each month for a period of three years. Which approach should be taken to meet this requirement?
Cloud SQL automatic backups cannot be directly exported or stored in a user-specified Cloud Storage bucket or class for long-term archival. To meet audit requirements for a specific point-in-time copy over a long duration, exporting the database content to a Cloud Storage bucket with an appropriate storage class (like Archive) is the recommended method. This allows for scheduled, auditable copies independent of the automatic backup retention policies.
You have deployed a custom application on a single Google Compute Engine instance. The application is configured to write its operational logs directly to the instance's local disk. Users are now reporting issues with the application, and you need to diagnose the problem by examining these logs. What is the most effective initial step to access these application logs for troubleshooting?
The application writes logs to disk, and the Cloud Logging Agent is not yet installed. Therefore, the most direct and immediate way to access these logs for diagnosis is to connect to the instance using SSH or the serial console and read them from the disk. While installing the Cloud Logging Agent (Option 4) is a best practice for future monitoring, it does not help with immediate diagnosis of existing logs on disk.
You are managing a Google Cloud Deployment Manager deployment and need to apply updates to its configuration without causing any downtime to the deployed resources. Which `gcloud` command should you use to achieve this?
The `gcloud deployment-manager deployments update` command is specifically designed to modify an existing Deployment Manager deployment. When used, Deployment Manager intelligently determines the necessary changes to resources (create, update, or delete) to match the new configuration, aiming to do so without causing downtime. The `create` commands are for initial deployment, and `resources` commands are not the correct scope for updating an entire deployment.