Google

Associate Cloud Engineer Free Practice Questions — Page 8

Question 70

You need to deploy an application in Google Cloud using serverless technology. You want to test a new version of the application with a small percentage of production traffic. What should you do?

A. Deploy the application to Cloud Run. Use gradual rollouts for traffic splitting.
B. Deploy the application to Google Kubernetes Engine. Use Anthos Service Mash for traffic splitting.
C. Deploy the application to Cloud Functions. Specify the version number in the functions name.
D. Deploy the application to App Engine. For each new version, create a new service.
Show Answer
Correct Answer: A
Explanation:
The requirements are a serverless platform and the ability to route a small percentage of production traffic to a new version. Cloud Run is fully serverless and natively supports traffic splitting across revisions, enabling gradual rollouts and canary testing. GKE is not serverless, Cloud Functions does not support traffic splitting by naming versions, and App Engine traffic splitting is done between versions of the same service—not by creating a new service for each version.

Question 71

Your company's security vulnerability management policy wants a member of the security team to have visibility into vulnerabilities and other OS metadata for a specific Compute Engine instance. This Compute Engine instance hosts a critical application in your Google Cloud project. You need to implement your company's security vulnerability management policy. What should you do?

A. • Ensure that the Ops Agent is installed on the Compute Engine instance. • Create a custom metric in the Cloud Monitoring dashboard. • Provide the security team member with access to this dashboard.
B. • Ensure that the Ops Agent is installed on the Compute Engine instance. • Provide the security team member roles/osconfig.inventoryViewer permission.
C. • Ensure that the OS Config agent is installed on the Compute Engine instance. • Provide the security team member roles/osconfig.vulnerabilityReportViewer permission.
D. • Ensure that the OS Config agent is installed on the Compute Engine instance. • Create a log sink to BigQuery dataset. • Provide the security team member with access to this dataset.
Show Answer
Correct Answer: C
Explanation:
Visibility into OS vulnerabilities and OS-level metadata on a Compute Engine VM is provided by OS Config, not the Ops Agent. The OS Config agent collects inventory and vulnerability data, and the roles/osconfig.vulnerabilityReportViewer role grants read-only access to vulnerability reports for the instance, aligning with least-privilege access for the security team.

Question 72

You need to migrate invoice documents stored on-premises to Cloud Storage. The documents have the following storage requirements: • Documents must be kept for five years. • Up to five revisions of the same invoice document must be stored, to allow for corrections. • Documents older than 365 days should be moved to lower cost storage tiers. You want to follow Google-recommended practices to minimize your operational and development costs. What should you do?

A. Enable retention policies on the bucket, and use Cloud Scheduler to invoke a Cloud Function to move or delete your documents based on their metadata.
B. Enable retention policies on the bucket, use lifecycle rules to change the storage classes of the objects, set the number of versions, and delete old files.
C. Enable object versioning on the bucket, and use Cloud Scheduler to invoke a Cloud Functions instance to move or delete your documents based on their metadata.
D. Enable object versioning on the bucket, use lifecycle conditions to change the storage class of the objects, set the number of versions, and delete old files.
Show Answer
Correct Answer: D
Explanation:
Object versioning is required to keep multiple revisions of each invoice. Cloud Storage lifecycle rules are the Google‑recommended, low‑ops way to automatically transition objects older than 365 days to lower‑cost storage classes and to delete old object versions or objects when they exceed the retention window. This avoids custom code and schedulers while meeting the requirements for version history, long‑term retention, and cost optimization. Options involving Cloud Functions/Scheduler increase operational overhead, and retention‑policy–only approaches do not provide document revision history.

Question 73

Your company developed an application to deploy on Google Kubernetes Engine. Certain parts of the application are not fault-tolerant and are allowed to have downtime. Other parts of the application are critical and must always be available. You need to configure a Google Kubernetes Engine cluster while optimizing for cost. What should you do?

A. Create a cluster with a single node-pool by using standard VMs. Label he fault-tolerant Deployments as spot_true.
B. Create a cluster with a single node-pool by using Spot VMs. Label the critical Deployments as spot_false.
C. Create a cluster with both a Spot VM node pool and a node pool by using standard VMs. Deploy the critical deployments on the Spot VM node pool and the fault-tolerant deployments on the node pool by using standard VMs.
D. Create a cluster with both a Spot VM node pool and a nods pool by using standard VMs. Deploy the critical deployments on the node pool by using standard VMs and the fault-tolerant deployments on the Spot VM node pool.
Show Answer
Correct Answer: D
Explanation:
To optimize cost while ensuring availability, use two node pools: Spot VMs for fault-tolerant workloads and standard VMs for critical workloads. Spot VMs are cheaper but can be preempted, making them suitable only for components that can tolerate downtime. Critical components that must always be available should run on standard VMs.

Question 74

You installed the Google Cloud CLI on your workstation and set the proxy configuration. However, you are worried that your proxy credentials will be recorded in the gcloud CLI logs. You want to prevent your proxy credential from being logged. What should you do?

A. Configure username and password by using gcloud config set proxy/username and gcloud config set proxy/password commands.
B. Encode username and password in sha256 encoding, and save in to a text file. Use filename as a value in the gcloud config set core/custom_ca_certs_file command.
C. Provide values for CLOUDSDK_PROXY_USERNAME and CLOUDSDK_PROXY_PASSWORD in the gcloud CLI tool configuration file.
D. Set the CLOUDSDK_PROXY_USERNAME and CLOUDSDK_PROXY_PASSWORD properties by using environment variables in your command line tool.
Show Answer
Correct Answer: D
Explanation:
Using environment variables (CLOUDSDK_PROXY_USERNAME and CLOUDSDK_PROXY_PASSWORD) prevents proxy credentials from being written to gcloud configuration files, shell history, or gcloud CLI logs. Google Cloud documentation explicitly recommends environment variables when you want to avoid credentials being recorded anywhere persistently, making this the safest option.

Question 75

Your application stores files on Cloud Storage by using the Standard Storage class. The application only requires access to files created in the last 30 days. You want to automatically save costs on files that are no longer accessed by the application. What should you do?

A. Create an object lifecycle on the storage bucket to change the storage class to Archive Storage for objects with an age over 30 days.
B. Create a cron job in Cloud Scheduler to call a Cloud Functions instance every day to delete files older than 30 days.
C. Create a retention policy on the storage bucket of 30 days, and lock the bucket by using a retention policy lock.
D. Enable object versioning on the storage bucket and add lifecycle rules to expire non-current versions after 30 days.
Show Answer
Correct Answer: A
Explanation:
The requirement is to automatically save costs for objects that are no longer needed by the application while keeping recent data accessible. Cloud Storage lifecycle management is the native, simplest solution. A lifecycle rule can transition objects older than 30 days from Standard Storage to a cheaper class such as Archive Storage, reducing cost without custom code or operational overhead. Deleting objects (B) is not stated as acceptable, retention policies (C) do not reduce cost, and versioning (D) increases storage usage rather than reducing it.

Question 76

You created several resources in multiple Google Cloud projects. All projects are linked to different billing accounts. To better estimate future charges, you want to have a single visual representation of all costs incurred. You want to include new cost data as soon as possible. What should you do?

A. Fill all resources in the Pricing Calculator to get an estimate of the monthly cost.
B. Use the Reports view in the Cloud Billing Console to view the desired cost information.
C. Visit the Cost Table page to get a CSV export and visualize it using Looker Studio.
D. Configure Billing Data Export to BigQuery and visualize the data in Looker Studio.
Show Answer
Correct Answer: D
Explanation:
You need a single, up-to-date visualization that aggregates costs across multiple projects and multiple billing accounts. Cloud Billing reports work only per billing account, and manual exports or calculators are static or delayed. Exporting billing data to BigQuery provides near-real-time, detailed cost data from all billing accounts, which can then be combined and visualized in Looker Studio as a single unified dashboard.

Question 77

You recently received a new Google Cloud project with an attached billing account where you will work. You need to create instances, set firewalls, and store data in Cloud Storage. You want to follow Google-recommended practices. What should you do?

A. Use the gcloud CLI services enable cloudresourcemanager.googleapis.com command to enable all resources.
B. Use the gcloud services enable compute.googleapis.com command to enable Compute Engine and the gcloud services enable storage-api.googleapis.com command to enable the Cloud Storage APIs.
C. Open the Google Cloud console and enable all Google Cloud APIs from the API dashboard.
D. Open the Google Cloud console and run gcloud init --project in a Cloud Shell.
Show Answer
Correct Answer: B
Explanation:
In a new Google Cloud project, Google-recommended practice is to explicitly enable only the required service APIs before using them. To create VM instances and manage firewalls you must enable the Compute Engine API, and to store data in Cloud Storage you must enable the Cloud Storage API. Using gcloud services enable for these specific APIs follows the principle of least privilege and avoids unnecessarily enabling all services. The other options either enable too much, do not enable required APIs, or only initialize the CLI without preparing the project.

Question 78

Your company has a large quantity of unstructured data in different file formats. You want to perform ETL transformations on the data. You need to make the data accessible on Google Cloud so it can be processed by a Dataflow job. What should you do?

A. Upload the data to BigQuery using the bq command line tool.
B. Upload the data to Cloud Storage using the gcloud storage command.
C. Upload the data into Cloud SQL using the import function in the Google Cloud console.
D. Upload the data into Cloud Spanner using the import function in the Google Cloud console.
Show Answer
Correct Answer: B
Explanation:
The data is unstructured and in multiple file formats, which is best stored in Cloud Storage. Cloud Dataflow natively reads from Cloud Storage for ETL processing. BigQuery, Cloud SQL, and Cloud Spanner are structured data stores and are not appropriate as initial landing zones for unstructured files.

Question 79

You are running multiple microservices in a Kubernetes Engine cluster. One microservice is rendering images. The microservice responsible for the image rendering requires a large amount of CPU time compared to the memory it requires. The other microservices are workloads that are optimized for n2-standard machine types. You need to optimize your cluster so that all workloads are using resources as efficiently as possible. What should you do?

A. Assign the pods of the image rendering microservice a higher pod priority than the other microservices.
B. Create a node pool with compute-optimized machine type nodes for the image rendering microservice. Use the node pool with general-purpose machine type nodes for the other microservices.
C. Use the node pool with general-purpose machine type nodes for the image rendering microservice. Create a node pool with compute-optimized machine type nodes for the other microservices.
D. Configure the required amount of CPU and memory in the resource requests specification of the image rendering microservice deployment. Keep the resource requests for the other microservices at the default.
Show Answer
Correct Answer: B
Explanation:
The image rendering microservice is CPU-intensive with relatively low memory needs, which aligns well with compute-optimized machine types. Creating a separate node pool with compute-optimized nodes allows that workload to use CPU resources efficiently, while keeping the other microservices on n2-standard (general-purpose) nodes that match their resource profile. This separation optimizes resource utilization across the cluster.

$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.