Google Professional Cloud DevOps Engineer Exam Questions

Page: 1 / 14
Total 205 questions
Question 1

You recently deployed your application in Google Kubernetes Engine (GKE) and now need to release a new version of the application You need the ability to instantly roll back to the previous version of the application in case there are issues with the new version Which deployment model should you use?



Answer : D

The best deployment model for releasing a new version of your application in GKE with the ability to instantly roll back to the previous version is to perform a blue/green deployment and test your new application after the deployment is complete. A blue/green deployment is a deployment strategy that involves creating two identical environments, one running the current version of the application (blue) and one running the new version of the application (green). The traffic is switched from blue to green after testing the new version, and if any issues are discovered, the traffic can be switched back to blue instantly. This way, you can minimize downtime and risk during deployment.


Question 2

Your company is migrating its production systems to Google Cloud. You need to implement site reliability engineering (SRE) practices during the migration to minimize customer impact from potential future incidents. Which two SRE practices should you implement?

Choose 2 answers



Answer : B, E

Comprehensive and Detailed Explanation From General SRE Principles and Google Cloud Knowledge:

Site Reliability Engineering (SRE) emphasizes reliability, automation, and a data-driven approach to operations. The goal is to minimize the 'time to detect' (TTD) and 'time to resolve' (TTR) for incidents.

Option A (Ensure that full autonomy and permissions are only granted to the on-call team): While the on-call team needs appropriate permissions to act decisively during an incident, granting full autonomy and only to them can be a bottleneck and goes against the principle of least privilege if not carefully scoped. Broader teams might need specific, controlled access for their responsibilities. SRE encourages empowering teams but within a structured framework.

Option B (Automate common tasks to analyze key impact information and intelligently suggest mitigating actions for the on-call team): This is a core SRE practice. Automation reduces toil, speeds up response, and ensures consistency. Analyzing impact and suggesting mitigations helps the on-call team resolve issues faster and more effectively.

Option C (Ensure that all teams can modify the production environment to resolve issues): This is generally a bad practice and against SRE principles of controlled changes and reducing the blast radius of errors. Production changes should be managed, audited, and ideally automated, not open to modification by all teams, as this increases the risk of unintended incidents.

Option D (Create an alerting mechanism for your SRE team based on your system's internal behavior): While alerting is crucial, SRE emphasizes alerting on symptoms that affect users (Service Level Objectives - SLOs) rather than just internal behavior or causes. Alerting solely on internal behavior can lead to alert fatigue and may not correlate directly with user impact. Good alerting focuses on user-facing impact first.

Option E (Create up-to-date playbooks with instructions for debugging and mitigating issues): Playbooks (or runbooks) are essential in SRE. They document known issues, troubleshooting steps, and mitigation procedures. Keeping them up-to-date ensures that on-call engineers can respond to incidents quickly and consistently, even for less common issues, thereby minimizing customer impact.

Therefore, automating incident response tasks (B) and maintaining clear, actionable playbooks (E) are two key SRE practices to implement for minimizing customer impact.

Reference (Based on SRE principles):

The SRE books by Google (e.g., 'Site Reliability Engineering: How Google Runs Production Systems') heavily emphasize automation to reduce toil and the importance of playbooks for incident management.

Google Cloud SRE solutions: https://cloud.google.com/sre

Specifically, regarding playbooks and automation:'Playbooks should be living documents, updated regularly as systems change and new incidents provide new lessons.'

'SREs aim to automate repetitive tasks (toil) to free up time for engineering projects that improve reliability.'


Question 3

You recently configured an App Hub application. You are able to see the managed instance group, backend service, and URL map listed in App Hub, but you do not see the forwarding rule. You must ensure that the forwarding rule is listed. What should you do?



Answer : D

Comprehensive and Detailed Explanation From General Google Cloud Knowledge:

App Hub allows you to organize and discover services and applications within your Google Cloud environment. For App Hub to recognize and display resources as components of an 'application,' these resources often need to be explicitly registered or discovered as 'services' within that application's configuration. While App Hub can automatically discover some resources (like GKE workloads, Cloud Run services), for other resources, or to establish specific relationships, manual registration or more detailed configuration is sometimes required.

Option A (Attach the project containing the forwarding rule as an App Hub service project): While App Hub works across projects (host project for the application, service projects for services and workloads), simply attaching the project might not be sufficient for App Hub to automatically pick up and categorize every resource like a forwarding rule specifically for a defined application without further context. The forwarding rule needs to be associated with a service within the App Hub application.

Option B (Enable the App Hub API in the project containing the forwarding rule): The App Hub API needs to be enabled in projects where you want to manage App Hub resources (applications, services, workloads). If it wasn't enabled, you likely wouldn't be able to see any resources from that project. Since other resources are visible, this is less likely the root cause for a single missing resource, though it's a prerequisite for App Hub to function at all with that project.

Option C (Configure the forwarding rule to forward to the correct target proxy): While correct configuration of the forwarding rule is essential for its operational functionality, App Hub's ability to list the forwarding rule is more about its discovery and registration within App Hub's model rather than its traffic-directing correctness. An incorrectly configured forwarding rule that is properly registered might still appear in App Hub, perhaps with an error status.

Option D (Register the forwarding rule as a service in the application configuration): App Hub applications are composed of 'services,' and these services are in turn composed of 'workloads' or other discovered/registered resources. A forwarding rule is typically an entry point or part of the infrastructure for a service. Explicitly registering it or the resource it points to (which then allows App Hub to trace back to the forwarding rule) as a service or part of a service within the application configuration would make it visible and properly cataloged by App Hub. App Hub discovers resources by looking for specific labels or by manual registration. If it's not automatically discovered as part of a recognized workload (like a GCE instance group service exposed via a load balancer), explicit registration is often the way to make it appear.

Reference (Based on general App Hub functionality):

App Hub discovers resources that are part of registered applications and their services. Services in App Hub can be based on various Google Cloud resources. If a resource like a forwarding rule isn't automatically linked to a displayed workload, it might need to be explicitly defined as a service or part of a service.

From the Google Cloud documentation on App Hub concepts:

'Applications are the core organizational unit in App Hub. An application represents a logical system that delivers business value... Services represent the logical components of an application... Workloads are instances of your services running on Google Cloud infrastructure. App Hub automatically discovers workloads for supported resource types or you can manually register them.'

Forwarding rules are associated with load balancing, which exposes services. If the service that the forwarding rule points to is correctly registered and identified by App Hub, associated infrastructure like the forwarding rule should typically be discoverable. If it's not, ensuring the service it fronts is correctly registered and that App Hub understands this link is key. Option D aligns with this concept of ensuring the relevant component (which the forwarding rule is part of) is registered within the application structure.

You can find more information in the official Google Cloud documentation regarding App Hub:

App Hub overview: https://cloud.google.com/app-hub/docs/overview

Registering services and workloads: Documentation would detail how different resources are discovered or need to be registered.


Question 4

You are building and running client applications in Cloud Run and Cloud Functions Your client requires that all logs must be available for one year so that the client can import the logs into their logging service You must minimize required code changes What should you do?



Answer : D

The best option for storing all logs for one year and minimizing required code changes is to create a logs bucket and logging sink, set the retention on the logs bucket to 365 days, configure the logging sink to send logs to the bucket, and give your client access to the bucket to retrieve the logs. A logs bucket is a Cloud Storage bucket that is used to store logs from Cloud Logging. A logging sink is a resource that defines where log entries are sent, such as a logs bucket, BigQuery dataset, or Pub/Sub topic. You can create a logs bucket and logging sink in Cloud Logging and set the retention on the logs bucket to 365 days. This way, you can ensure that all logs are stored for one year and protected from deletion. You can also configure the logging sink to send logs from Cloud Run and Cloud Functions to the logs bucket without any code changes. You can then give your client access to the logs bucket by using IAM policies or signed URLs.


Question 5

Your company operates in a highly regulated domain that requires you to store all organization logs for seven years You want to minimize logging infrastructure complexity by using managed services You need to avoid any future loss of log capture or stored logs due to misconfiguration or human error What should you do?



Answer : B

The best option for storing all organization logs for seven years and avoiding any future loss of log capture or stored logs due to misconfiguration or human error is to use Cloud Logging to configure an aggregated sink at the organization level to export all logs into Cloud Storage with a seven-year retention policy and Bucket Lock. Cloud Logging is a service that allows you to collect and manage logs from your Google Cloud resources and applications. An aggregated sink is a sink that collects logs from multiple sources, such as projects, folders, or organizations. You can use Cloud Logging to configure an aggregated sink at the organization level to export all logs into Cloud Storage, which is a service that allows you to store and access data in Google Cloud. A retention policy is a policy that specifies how long objects in a bucket are retained before they are deleted. Bucket Lock is a feature that allows you to lock a retention policy on a bucket and prevent it from being reduced or removed. You can use Cloud Storage with a seven-year retention policy and Bucket Lock to ensure that your logs are stored for seven years and protected from accidental or malicious deletion.


Question 6

You are running a web application deployed to a Compute Engine managed instance group Ops Agent is installed on all instances You recently noticed suspicious activity from a specific IP address You need to configure Cloud Monitoring to view the number of requests from that specific IP address with minimal operational overhead. What should you do?



Answer : A

The best option for configuring Cloud Monitoring to view the number of requests from a specific IP address with minimal operational overhead is to configure the Ops Agent with a logging receiver andcreate a logs-based metric. The Ops Agent is an agent that collects system metrics and logs from your VM instances and sends them to Cloud Monitoring and Cloud Logging. A logging receiver is a configuration that specifies which logs are collected by the Ops Agent and how they are processed. You can use a logging receiver to collect web server logs from your VM instances and send them to Cloud Logging. A logs-based metric is a metric that is extracted from log entries in Cloud Logging. You can use a logs-based metric to count the number of requests from a specific IP address by using a filter expression. You can then use Cloud Monitoring to view and analyze the logs-based metric.


Question 7

Your team is building a service that performs compute-heavy processing on batches of data The data is processed faster based on the speed and number of CPUs on the machine These batches of data vary in size and may arrive at any time from multiple third-party sources You need to ensure that third partiesare able to upload their data securely. You want to minimize costs while ensuring that the data is processed as quickly as possible What should you do?



Answer : C

The best option for ensuring that third parties are able to upload their data securely and minimizing costs while ensuring that the data is processed as quickly as possible is to provide a Cloud Storage bucket so that third parties can upload batches of data, and provide appropriate Identity and Access Management (IAM) access to the bucket; create a Cloud Function with a google.storage.object.finalize Cloud Storage trigger; write code so that the function can scale up a Compute Engine autoscaling managed instance group; use an image pre-loaded with the data processing software that terminates the instances when processing completes. A Cloud Storage bucket is a resource that allows you to store and access data in Google Cloud. You can provide a Cloud Storage bucket so that third parties can upload batches of data securely and conveniently. You can also provide appropriate IAM access to the bucket by using roles and policies to control who can read or write data to the bucket. A Cloud Function is a serverless function that executes code in response to an event, such as a change in a Cloud Storage bucket. A google.storage.object.finalize trigger is a type of trigger that fires when a new object is created or an existing object is overwritten in a Cloud Storage bucket. You can create a Cloud Function with a google.storage.object.finalize trigger so that the function runs whenever a new batch of data is uploaded to the bucket. You can write code so that the function can scale up a Compute Engine autoscaling managed instance group, which is a group of VM instances that automatically adjusts its size based on load or custom metrics. You can use an image pre-loaded with the data processing software that terminates the instances when processing completes, which means that the instances only run when there is data to process and stop when they are done. This way, you can minimize costs while ensuring that the data is processed as quickly as possible.


Page:    1 / 14   
Total 205 questions