Associate Cloud Engineer Free Practice Questions — Page 10
Question 90
Your application development team has created Docker images for an application that will be deployed on Google Cloud. Your team does not want to manage the infrastructure associated with this application. You need to ensure that the application can scale automatically as it gains popularity. What should you do?
A. Create an instance template with the container image, and deploy a Managed Instance Group with Autoscaling.
B. Upload Docker images to Artifact Registry, and deploy the application on Google Kubernetes Engine using Standard mode.
C. Upload Docker images to the Cloud Storage, and deploy the application on Google Kubernetes Engine using Standard mode.
D. Upload Docker images to Artifact Registry, and deploy the application on Cloud Run.
Show Answer
Correct Answer: D
Explanation: The team does not want to manage infrastructure and needs automatic scaling for a containerized application. Cloud Run is a fully managed serverless container platform that automatically scales based on traffic and abstracts away servers and clusters. Artifact Registry is the correct place to store Docker images. Other options (Managed Instance Groups or GKE Standard) require managing underlying infrastructure or nodes.
Question 91
You have a batch workload that runs every night and uses a large number of virtual machines (VMs). It is fault-tolerant and can tolerate some of the VMs being terminated. The current cost of VMs is too high. What should you do?
A. Run a test using simulated maintenance events. If the test is successful, use Spot N2 Standard VMs when running future jobs.
B. Run a test using simulated maintenance events. If the test is successful, use N2 Standard VMs when running future jobs.
C. Run a test using a managed instance group. If the test is successful, use N2 Standard VMs in the managed instance group when running future jobs.
D. Run a test using N1 standard VMs instead of N2. If the test is successful, use N1 Standard VMs when running future jobs.
Show Answer
Correct Answer: A
Explanation: The workload is batch-oriented, runs on many VMs, and is explicitly fault-tolerant, meaning it can handle VM terminations. The primary concern is reducing cost. Spot VMs are designed for exactly this scenario, offering steep discounts compared to regular on-demand VMs, with the trade-off that instances can be terminated at any time. Running a test with simulated maintenance/preemption events validates the workload’s resilience before switching. The other options continue to use regular N1/N2 VMs, which do not meaningfully reduce cost, or focus on instance management rather than pricing.
Question 92
The DevOps group in your organization needs full control of Compute Engine resources in your development project. However, they should not have permission to create or update any other resources in the project. You want to follow Google’s recommendations for setting permissions for the DevOps group. What should you do?
A. Grant the basic role roles/viewer and the predefined role roles/compute.admin to the DevOps group.
B. Create an IAM policy and grant all compute.instanceAdmin.* permissions to the policy. Attach the policy to the DevOps group.
C. Create a custom role at the folder level and grant all compute.instanceAdmin.* permissions to the role. Grant the custom role to the DevOps group.
D. Grant the basic role roles/editor to the DevOps group.
Show Answer
Correct Answer: A
Explanation: The requirement is full control of Compute Engine resources while preventing creation or modification of other resource types. Google recommends using predefined roles rather than basic editor/owner or unnecessary custom roles. The predefined role roles/compute.admin provides full control over all Compute Engine resources only. Adding roles/viewer gives read-only visibility across the project without allowing creation or updates of non-Compute resources. Other options are incorrect because custom roles or instanceAdmin permissions do not provide full Compute Engine control or are unnecessarily complex and not recommended here.
Question 93
Your team is running an on-premises ecommerce application. The application contains a complex set of microservices written in Python, and each microservice is running on Docker containers. Configurations are injected by using environment variables. You need to deploy your current application to a serverless Google Cloud cloud solution. What should you do?
A. Use your existing CI/CD pipeline. Use the generated Docker images and deploy them to Cloud Run. Update the configurations and the required endpoints.
B. Use your existing continuous integration and delivery (CI/CD) pipeline. Use the generated Docker images and deploy them to Cloud Function. Use the same configuration as on-premises.
C. Use the existing codebase and deploy each service as a separate Cloud Function. Update the configurations and the required endpoints.
D. Use your existing codebase and deploy each service as a separate Cloud Run. Use the same configurations as on-premises.
Show Answer
Correct Answer: A
Explanation: The application already runs as containerized microservices with configuration via environment variables, which maps directly to Cloud Run’s serverless container model. You can reuse the existing CI/CD pipeline to build Docker images, push them to Artifact Registry, and deploy to Cloud Run with minimal changes, only updating configurations and service endpoints as required by the new environment. Cloud Functions is not suitable for complex container-based microservices, and reusing on‑premises configurations without adjustment is not valid due to Cloud Run’s runtime requirements.
Question 94
You have deployed an application on a single Compute Engine instance. The application writes logs to disk. Users start reporting errors with the application. You want to diagnose the problem. What should you do?
A. Navigate to Cloud Logging and view the application logs.
B. Configure a health check on the instance and set a “consecutive successes” Healthy threshold value of 1.
C. Connect to the instance’s serial console and read the application logs.
D. Install and configure the Ops agent and view the logs from Cloud Logging.
Show Answer
Correct Answer: D
Explanation: The application writes logs to the VM’s local disk. By default, Compute Engine instances do not automatically send application logs to Cloud Logging. Installing and configuring the Ops Agent is required to collect those on-disk logs and forward them to Cloud Logging, where you can then inspect them to diagnose the errors. Simply navigating to Cloud Logging without the agent would not show the application logs, and health checks or the serial console are not appropriate for routine log analysis.
Question 95
Your company has an internal application for managing transactional orders. The application is used exclusively by employees in a single physical location. The application requires strong consistency, fast queries, and ACID guarantees for multi-table transactional updates. The first version of the application is implemented in PostgreSQL, and you want to deploy it to the cloud with minimal code changes. Which database is most appropriate for this application?
A. Bigtable
B. BigQuery
C. Cloud SQL
D. Firestore
Show Answer
Correct Answer: C
Explanation: The application already uses PostgreSQL and requires strong consistency, fast queries, and full ACID guarantees with multi-table transactions. Cloud SQL is a managed relational database service that directly supports PostgreSQL, allowing deployment to the cloud with minimal or no code changes while preserving transactional semantics. The other options are analytical or NoSQL databases and do not meet the relational ACID or minimal-migration requirements.
Question 96
You want to host your video encoding software on Compute Engine. Your user base is growing rapidly, and users need to be able to encode their videos at any time without interruption or CPU limitations. You must ensure that your encoding solution is highly available, and you want to follow Google-recommended practices to automate operations. What should you do?
A. Deploy your solution on multiple standalone Compute Engine instances, and increase the number of existing instances when CPU utilization on Cloud Monitoring reaches a certain threshold.
B. Deploy your solution on multiple standalone Compute Engine instances, and replace existing instances with high-CPU instances when CPU utilization on Cloud Monitoring reaches a certain threshold.
C. Deploy your solution to an instance group, and increase the number of available instances whenever you see high CPU utilization in Cloud Monitoring.
D. Deploy your solution to an instance group, and set the autoscaling based on CPU utilization.
Show Answer
Correct Answer: D
Explanation: Using a managed instance group with autoscaling based on CPU utilization follows Google-recommended practices for high availability and automation. Managed instance groups provide self-healing, automatic distribution across zones, and seamless scaling. CPU-based autoscaling ensures encoding capacity grows and shrinks automatically with demand, without manual intervention or service interruption.
Question 97
Your company is using Google Workspace to manage employee accounts. Anticipated growth will increase the number of personnel from 100 employees to 1,000 employees within 2 years. Most employees will need access to your company’s Google Cloud account. The systems and processes will need to support 10x growth without performance degradation, unnecessary complexity, or security issues. What should you do?
A. Migrate the users to Active Directory. Connect the Human Resources system to Active Directory. Turn on Google Cloud Directory Sync (GCDS) for Cloud Identity. Turn on Identity Federation from Cloud Identity to Active Directory.
B. Organize the users in Cloud Identity into groups. Enforce multi-factor authentication in Cloud Identity.
C. Turn on identity federation between Cloud Identity and Google Workspace. Enforce multi-factor authentication for domain wide delegation.
D. Use a third-party identity provider service through federation. Synchronize the users from Google Workplace to the third-party provider in real time.
Show Answer
Correct Answer: B
Explanation: Google Workspace already uses Cloud Identity as its identity provider for Google Cloud. To scale from 100 to 1,000 users without added complexity, you should continue managing identities natively in Cloud Identity/Workspace. Using groups enables scalable, role-based access management to Google Cloud resources, and enforcing multi-factor authentication improves security. There is no need for identity federation between Workspace and Cloud Identity (they are the same identity system), nor to introduce Active Directory or a third‑party IdP, which would add unnecessary complexity and operational overhead.
Question 98
You have created an application that is packaged into a Docker image. You want to deploy the Docker image as a workload on Google Kubernetes Engine. What should you do?
A. Upload the image to Cloud Storage and create a Kubernetes Service referencing the image.
B. Upload the image to Cloud Storage and create a Kubernetes Deployment referencing the image.
C. Upload the image to Artifact Registry and create a Kubernetes Service referencing the image.
D. Upload the image to Artifact Registry and create a Kubernetes Deployment referencing the image.
Show Answer
Correct Answer: D
Explanation: Docker images for GKE should be stored in a container registry such as Artifact Registry, which is designed for container images and integrates with GKE. To run the image as a workload, you create a Kubernetes Deployment, which defines and manages pods, replicas, and updates. A Service is only for networking, and Cloud Storage is not intended for hosting container images.
Question 99
Your application is running on Google Cloud in a managed instance group (MIG). You see errors in Cloud Logging for one VM that one of the processes is not responsive. You want to replace this VM in the MIG quickly. What should you do?
A. Use the gcloud compute instances update command with a REFRESH action for the VM.
B. Use the gcloud compute instance-groups managed recreate-instances command to recreate the VM.
C. Select the MIG from the Compute Engine console and, in the menu, select Replace VMs.
D. Update and apply the instance template of the MIG.
Show Answer
Correct Answer: B
Explanation: In a managed instance group, the fastest and most direct way to replace a single unhealthy VM is to explicitly recreate that instance. The `gcloud compute instance-groups managed recreate-instances` command deletes and recreates the specified VM immediately using the current instance template. Other options either trigger broader actions (template update, rolling replace) or are indirect/less precise for a single VM.
$19
Get all 314 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.