πŸ”

PCD β€” questions

Page 10 of 18 Β· 359 total questions.

Topic 1 Β· Question 181

Your team is building an application for a financial institution. The application's frontend runs on Compute Engine, and the data resides in Cloud SQL and one Cloud Storage bucket. The application will collect data containing PII, which will be stored in the Cloud SQL database and the Cloud Storage bucket. You need to secure the PII data. What should you do?

  • A1. Create the relevant firewall rules to allow only the frontend to communicate with the Cloud SQL database2. Using IAM, allow only the frontend service account to access the Cloud Storage bucket
  • B1. Create the relevant firewall rules to allow only the frontend to communicate with the Cloud SQL database2. Enable private access to allow the frontend to access the Cloud Storage bucket privately
  • C1. Configure a private IP address for Cloud SQL2. Use VPC-SC to create a service perimeter3. Add the Cloud SQL database and the Cloud Storage bucket to the same service perimeter (correct answer)
  • D1. Configure a private IP address for Cloud SQL2. Use VPC-SC to create a service perimeter3. Add the Cloud SQL database and the Cloud Storage bucket to different service perimeters
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: 1. Configure a private IP address for Cloud SQL2. Use VPC-SC to create a service perimeter3. Add the Cloud SQL database and the Cloud Storage bucket to the same service perimeter

Explanation

Cloud Storage provides durable, scalable object storage that is fully managed. Cloud SQL is a managed relational database (MySQL/PostgreSQL/SQL Server) that handles patching, backups, and failover. A VPC provides a global, software-defined private network for your Google Cloud resources.

Topic 1 Β· Question 182

You are designing a chat room application that will host multiple rooms and retain the message history for each room. You have selected Firestore as your database. How should you represent the data in Firestore?

  • ACreate a collection for the rooms. For each room, create a document that lists the contents of the messages
  • BCreate a collection for the rooms. For each room, create a collection that contains a document for each message
  • CCreate a collection for the rooms. For each room, create a document that contains a collection for documents, each of which contains a message. (correct answer)
  • DCreate a collection for the rooms, and create a document for each room. Create a separate collection for messages, with one document per message. Each room’s document contains a list of references to the messages.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Create a collection for the rooms. For each room, create a document that contains a collection for documents, each of which contains a message.

Topic 1 Β· Question 183

You are developing an application that will handle requests from end users. You need to secure a Cloud Function called by the application to allow authorized end users to authenticate to the function via the application while restricting access to unauthorized users. You will integrate Google Sign-In as part of the solution and want to follow Google-recommended best practices. What should you do?

  • ADeploy from a source code repository and grant users the roles/cloudfunctions.viewer role.
  • BDeploy from a source code repository and grant users the roles/cloudfunctions.invoker role (correct answer)
  • CDeploy from your local machine using gcloud and grant users the roles/cloudfunctions.admin role
  • DDeploy from your local machine using gcloud and grant users the roles/cloudfunctions.developer role
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Deploy from a source code repository and grant users the roles/cloudfunctions.invoker role.

Topic 1 Β· Question 184

You are running a web application on Google Kubernetes Engine that you inherited. You want to determine whether the application is using libraries with known vulnerabilities or is vulnerable to XSS attacks. Which service should you use?

  • AGoogle Cloud Armor
  • BDebugger
  • CWeb Security Scanner (correct answer)
  • DError Reporting
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Web Security Scanner.

Topic 1 Β· Question 185

You are building a highly available and globally accessible application that will serve static content to users. You need to configure the storage and serving components. You want to minimize management overhead and latency while maximizing reliability for users. What should you do?

  • A1. Create a managed instance group. Replicate the static content across the virtual machines (VMs)2. Create an external HTTP(S) load balancer.3. Enable Cloud CDN, and send traffic to the managed instance group.
  • B1. Create an unmanaged instance group. Replicate the static content across the VMs.2. Create an external HTTP(S) load balancer3. Enable Cloud CDN, and send traffic to the unmanaged instance group.
  • C1. Create a Standard storage class, regional Cloud Storage bucket. Put the static content in the bucket2. Reserve an external IP address, and create an external HTTP(S) load balancer3. Enable Cloud CDN, and send traffic to your backend bucket
  • D1. Create a Standard storage class, multi-regional Cloud Storage bucket. Put the static content in the bucket.2. Reserve an external IP address, and create an external HTTP(S) load balancer.3. Enable Cloud CDN, and send traffic to your backend bucket. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: 1. Create a Standard storage class, multi-regional Cloud Storage bucket. Put the static content in the bucket.2. Reserve an external IP address, and create an external HTTP(S) load balancer.3. Enable Cloud CDN, and se...

Explanation

Cloud Storage provides durable, scalable object storage that is fully managed. Cloud CDN caches content at Google edge locations to reduce latency and offload origins. The external HTTP(S) Load Balancer distributes global web traffic with a single anycast IP. By spanning multiple Availability Zones / adding redundancy, this option provides the high availability and resilience required.

Topic 1 Β· Question 186

Case study - This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided. To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study. At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section. To start the case study - To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question, click the Question button to return to the question. Company Overview - HipLocal is a community application designed to facilitate communication between people in close proximity. It is used for event planning and organizing sporting events, and for businesses to connect with their local communities. HipLocal launched recently in a few neighborhoods in Dallas and is rapidly growing into a global phenomenon. Its unique style of hyper-local community communication and business outreach is in demand around the world. Executive Statement - We are the number one local community app; it's time to take our local community services global. Our venture capital investors want to see rapid growth and the same great experience for new local and virtual communities that come online, whether their members are 10 or 10000 miles away from each other. Solution Concept - HipLocal wants to expand their existing service, with updated functionality, in new regions to better serve their global customers. They want to hire and train a new team to support these regions in their time zones. They will need to ensure that the application scales smoothly and provides clear uptime data, and that they analyze and respond to any issues that occur. Existing Technical Environment - HipLocal's environment is a mix of on-premises hardware and infrastructure running in Google Cloud Platform. The HipLocal team understands their application well, but has limited experience in global scale applications. Their existing technical environment is as follows: β€’ Existing APIs run on Compute Engine virtual machine instances hosted in GCP. β€’ State is stored in a single instance MySQL database in GCP. β€’ Release cycles include development freezes to allow for QA testing. β€’ The application has no logging. β€’ Applications are manually deployed by infrastructure engineers during periods of slow traffic on weekday evenings. β€’ There are basic indicators of uptime; alerts are frequently fired when the APIs are unresponsive. Business Requirements - HipLocal's investors want to expand their footprint and support the increase in demand they are seeing. Their requirements are: β€’ Expand availability of the application to new regions. β€’ Support 10x as many concurrent users. β€’ Ensure a consistent experience for users when they travel to different regions. β€’ Obtain user activity metrics to better understand how to monetize their product. β€’ Ensure compliance with regulations in the new regions (for example, GDPR). β€’ Reduce infrastructure management time and cost. β€’ Adopt the Google-recommended practices for cloud computing. β—‹ Develop standardized workflows and processes around application lifecycle management. β—‹ Define service level indicators (SLIs) and service level objectives (SLOs). Technical Requirements - β€’ Provide secure communications between the on-premises data center and cloud-hosted applications and infrastructure. β€’ The application must provide usage metrics and monitoring. β€’ APIs require authentication and authorization. β€’ Implement faster and more accurate validation of new features. β€’ Logging and performance metrics must provide actionable information to be able to provide debugging information and alerts. β€’ Must scale to meet user demand. For this question refer to the HipLocal case study. HipLocal wants to reduce the latency of their services for users in global locations. They have created read replicas of their database in locations where their users reside and configured their service to read traffic using those replicas. How should they further reduce latency for all database interactions with the least amount of effort?

  • AMigrate the database to Bigtable and use it to serve all global user traffic.
  • BMigrate the database to Cloud Spanner and use it to serve all global user traffic. (correct answer)
  • CMigrate the database to Firestore in Datastore mode and use it to serve all global user traffic.
  • DMigrate the services to Google Kubernetes Engine and use a load balancer service to better scale the application.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Migrate the database to Cloud Spanner and use it to serve all global user traffic.

Explanation

Cloud Spanner is a horizontally scalable, strongly consistent relational database with global reach.

Topic 1 Β· Question 187

Case study - This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided. To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study. At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section. To start the case study - To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question, click the Question button to return to the question. Company Overview - HipLocal is a community application designed to facilitate communication between people in close proximity. It is used for event planning and organizing sporting events, and for businesses to connect with their local communities. HipLocal launched recently in a few neighborhoods in Dallas and is rapidly growing into a global phenomenon. Its unique style of hyper-local community communication and business outreach is in demand around the world. Executive Statement - We are the number one local community app; it's time to take our local community services global. Our venture capital investors want to see rapid growth and the same great experience for new local and virtual communities that come online, whether their members are 10 or 10000 miles away from each other. Solution Concept - HipLocal wants to expand their existing service, with updated functionality, in new regions to better serve their global customers. They want to hire and train a new team to support these regions in their time zones. They will need to ensure that the application scales smoothly and provides clear uptime data, and that they analyze and respond to any issues that occur. Existing Technical Environment - HipLocal's environment is a mix of on-premises hardware and infrastructure running in Google Cloud Platform. The HipLocal team understands their application well, but has limited experience in global scale applications. Their existing technical environment is as follows: β€’ Existing APIs run on Compute Engine virtual machine instances hosted in GCP. β€’ State is stored in a single instance MySQL database in GCP. β€’ Release cycles include development freezes to allow for QA testing. β€’ The application has no logging. β€’ Applications are manually deployed by infrastructure engineers during periods of slow traffic on weekday evenings. β€’ There are basic indicators of uptime; alerts are frequently fired when the APIs are unresponsive. Business Requirements - HipLocal's investors want to expand their footprint and support the increase in demand they are seeing. Their requirements are: β€’ Expand availability of the application to new regions. β€’ Support 10x as many concurrent users. β€’ Ensure a consistent experience for users when they travel to different regions. β€’ Obtain user activity metrics to better understand how to monetize their product. β€’ Ensure compliance with regulations in the new regions (for example, GDPR). β€’ Reduce infrastructure management time and cost. β€’ Adopt the Google-recommended practices for cloud computing. β—‹ Develop standardized workflows and processes around application lifecycle management. β—‹ Define service level indicators (SLIs) and service level objectives (SLOs). Technical Requirements - β€’ Provide secure communications between the on-premises data center and cloud-hosted applications and infrastructure. β€’ The application must provide usage metrics and monitoring. β€’ APIs require authentication and authorization. β€’ Implement faster and more accurate validation of new features. β€’ Logging and performance metrics must provide actionable information to be able to provide debugging information and alerts. β€’ Must scale to meet user demand. For this question, refer to the HipLocal case study. Which Google Cloud product addresses HipLocal’s business requirements for service level indicators and objectives?

  • ACloud Profiler
  • BCloud Monitoring (correct answer)
  • CCloud Trace
  • DCloud Logging
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Cloud Monitoring

Explanation

Cloud Monitoring collects metrics, dashboards, and alerts to observe system health.

Topic 1 Β· Question 188

Case study - This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided. To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study. At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section. To start the case study - To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question, click the Question button to return to the question. Company Overview - HipLocal is a community application designed to facilitate communication between people in close proximity. It is used for event planning and organizing sporting events, and for businesses to connect with their local communities. HipLocal launched recently in a few neighborhoods in Dallas and is rapidly growing into a global phenomenon. Its unique style of hyper-local community communication and business outreach is in demand around the world. Executive Statement - We are the number one local community app; it's time to take our local community services global. Our venture capital investors want to see rapid growth and the same great experience for new local and virtual communities that come online, whether their members are 10 or 10000 miles away from each other. Solution Concept - HipLocal wants to expand their existing service, with updated functionality, in new regions to better serve their global customers. They want to hire and train a new team to support these regions in their time zones. They will need to ensure that the application scales smoothly and provides clear uptime data, and that they analyze and respond to any issues that occur. Existing Technical Environment - HipLocal's environment is a mix of on-premises hardware and infrastructure running in Google Cloud Platform. The HipLocal team understands their application well, but has limited experience in global scale applications. Their existing technical environment is as follows: β€’ Existing APIs run on Compute Engine virtual machine instances hosted in GCP. β€’ State is stored in a single instance MySQL database in GCP. β€’ Release cycles include development freezes to allow for QA testing. β€’ The application has no logging. β€’ Applications are manually deployed by infrastructure engineers during periods of slow traffic on weekday evenings. β€’ There are basic indicators of uptime; alerts are frequently fired when the APIs are unresponsive. Business Requirements - HipLocal's investors want to expand their footprint and support the increase in demand they are seeing. Their requirements are: β€’ Expand availability of the application to new regions. β€’ Support 10x as many concurrent users. β€’ Ensure a consistent experience for users when they travel to different regions. β€’ Obtain user activity metrics to better understand how to monetize their product. β€’ Ensure compliance with regulations in the new regions (for example, GDPR). β€’ Reduce infrastructure management time and cost. β€’ Adopt the Google-recommended practices for cloud computing. β—‹ Develop standardized workflows and processes around application lifecycle management. β—‹ Define service level indicators (SLIs) and service level objectives (SLOs). Technical Requirements - β€’ Provide secure communications between the on-premises data center and cloud-hosted applications and infrastructure. β€’ The application must provide usage metrics and monitoring. β€’ APIs require authentication and authorization. β€’ Implement faster and more accurate validation of new features. β€’ Logging and performance metrics must provide actionable information to be able to provide debugging information and alerts. β€’ Must scale to meet user demand. For this question, refer to the HipLocal case study. A recent security audit discovers that HipLocal’s database credentials for their Compute Engine-hosted MySQL databases are stored in plain text on persistent disks. HipLocal needs to reduce the risk of these credentials being stolen. What should they do?

  • ACreate a service account and download its key. Use the key to authenticate to Cloud Key Management Service (KMS) to obtain the database credentials.
  • BCreate a service account and download its key. Use the key to authenticate to Cloud Key Management Service (KMS) to obtain a key used to decrypt the database credentials.
  • CCreate a service account and grant it the roles/iam.serviceAccountUser role. Impersonate as this account and authenticate using the Cloud SQL Proxy.
  • DGrant the roles/secretmanager.secretAccessor role to the Compute Engine service account. Store and access the database credentials with the Secret Manager API. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Grant the roles/secretmanager.secretAccessor role to the Compute Engine service account. Store and access the database credentials with the Secret Manager API.

Explanation

Compute Engine provides configurable virtual machines when you need full control of the OS. A service account provides an identity for workloads to access Google Cloud APIs securely. Secret Manager stores and controls access to secrets such as API keys and credentials.

Topic 1 Β· Question 189

Case study - This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided. To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study. At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section. To start the case study - To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question, click the Question button to return to the question. Company Overview - HipLocal is a community application designed to facilitate communication between people in close proximity. It is used for event planning and organizing sporting events, and for businesses to connect with their local communities. HipLocal launched recently in a few neighborhoods in Dallas and is rapidly growing into a global phenomenon. Its unique style of hyper-local community communication and business outreach is in demand around the world. Executive Statement - We are the number one local community app; it's time to take our local community services global. Our venture capital investors want to see rapid growth and the same great experience for new local and virtual communities that come online, whether their members are 10 or 10000 miles away from each other. Solution Concept - HipLocal wants to expand their existing service, with updated functionality, in new regions to better serve their global customers. They want to hire and train a new team to support these regions in their time zones. They will need to ensure that the application scales smoothly and provides clear uptime data, and that they analyze and respond to any issues that occur. Existing Technical Environment - HipLocal's environment is a mix of on-premises hardware and infrastructure running in Google Cloud Platform. The HipLocal team understands their application well, but has limited experience in global scale applications. Their existing technical environment is as follows: β€’ Existing APIs run on Compute Engine virtual machine instances hosted in GCP. β€’ State is stored in a single instance MySQL database in GCP. β€’ Release cycles include development freezes to allow for QA testing. β€’ The application has no logging. β€’ Applications are manually deployed by infrastructure engineers during periods of slow traffic on weekday evenings. β€’ There are basic indicators of uptime; alerts are frequently fired when the APIs are unresponsive. Business Requirements - HipLocal's investors want to expand their footprint and support the increase in demand they are seeing. Their requirements are: β€’ Expand availability of the application to new regions. β€’ Support 10x as many concurrent users. β€’ Ensure a consistent experience for users when they travel to different regions. β€’ Obtain user activity metrics to better understand how to monetize their product. β€’ Ensure compliance with regulations in the new regions (for example, GDPR). β€’ Reduce infrastructure management time and cost. β€’ Adopt the Google-recommended practices for cloud computing. β—‹ Develop standardized workflows and processes around application lifecycle management. β—‹ Define service level indicators (SLIs) and service level objectives (SLOs). Technical Requirements - β€’ Provide secure communications between the on-premises data center and cloud-hosted applications and infrastructure. β€’ The application must provide usage metrics and monitoring. β€’ APIs require authentication and authorization. β€’ Implement faster and more accurate validation of new features. β€’ Logging and performance metrics must provide actionable information to be able to provide debugging information and alerts. β€’ Must scale to meet user demand. For this question, refer to the HipLocal case study. HipLocal is expanding into new locations. They must capture additional data each time the application is launched in a new European country. This is causing delays in the development process due to constant schema changes and a lack of environments for conducting testing on the application changes. How should they resolve the issue while meeting the business requirements?

  • ACreate new Cloud SQL instances in Europe and North America for testing and deployment. Provide developers with local MySQL instances to conduct testing on the application changes.
  • BMigrate data to Bigtable. Instruct the development teams to use the Cloud SDK to emulate a local Bigtable development environment.
  • CMove from Cloud SQL to MySQL hosted on Compute Engine. Replicate hosts across regions in the Americas and Europe. Provide developers with local MySQL instances to conduct testing on the application changes.
  • DMigrate data to Firestore in Native mode and set up instances in Europe and North America. Instruct the development teams to use the Cloud SDK to emulate a local Firestore in Native mode development environment. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Migrate data to Firestore in Native mode and set up instances in Europe and North America. Instruct the development teams to use the Cloud SDK to emulate a local Firestore in Native mode development environment.

Explanation

Firestore is a serverless, autoscaling NoSQL document database ideal for app and user data.

Topic 1 Β· Question 190

You are writing from a Go application to a Cloud Spanner database. You want to optimize your application’s performance using Google-recommended best practices. What should you do?

  • AWrite to Cloud Spanner using Cloud Client Libraries. (correct answer)
  • BWrite to Cloud Spanner using Google API Client Libraries
  • CWrite to Cloud Spanner using a custom gRPC client library.
  • DWrite to Cloud Spanner using a third-party HTTP client library.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Write to Cloud Spanner using Cloud Client Libraries.

Explanation

Cloud Spanner is a horizontally scalable, strongly consistent relational database with global reach.

Topic 1 Β· Question 191

You have an application deployed in Google Kubernetes Engine (GKE). You need to update the application to make authorized requests to Google Cloud managed services. You want this to be a one-time setup, and you need to follow security best practices of auto-rotating your security keys and storing them in an encrypted store. You already created a service account with appropriate access to the Google Cloud service. What should you do next?

  • AAssign the Google Cloud service account to your GKE Pod using Workload Identity. (correct answer)
  • BExport the Google Cloud service account, and share it with the Pod as a Kubernetes Secret.
  • CExport the Google Cloud service account, and embed it in the source code of the application.
  • DExport the Google Cloud service account, and upload it to HashiCorp Vault to generate a dynamic service account for your application.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Assign the Google Cloud service account to your GKE Pod using Workload Identity.

Explanation

Google Kubernetes Engine runs managed Kubernetes for containerized, portable workloads. Workload Identity Federation lets workloads access Google Cloud without long-lived service account keys. A service account provides an identity for workloads to access Google Cloud APIs securely.

Topic 1 Β· Question 192

You are planning to deploy hundreds of microservices in your Google Kubernetes Engine (GKE) cluster. How should you secure communication between the microservices on GKE using a managed service?

  • AUse global HTTP(S) Load Balancing with managed SSL certificates to protect your services
  • BDeploy open source Istio in your GKE cluster, and enable mTLS in your Service Mesh
  • CInstall cert-manager on GKE to automatically renew the SSL certificates.
  • DInstall Anthos Service Mesh, and enable mTLS in your Service Mesh. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Install Anthos Service Mesh, and enable mTLS in your Service Mesh.

Explanation

Anthos runs and manages Kubernetes workloads consistently across on-premises and clouds.

Topic 1 Β· Question 193 Β· Select all that apply

You are developing an application that will store and access sensitive unstructured data objects in a Cloud Storage bucket. To comply with regulatory requirements, you need to ensure that all data objects are available for at least 7 years after their initial creation. Objects created more than 3 years ago are accessed very infrequently (less than once a year). You need to configure object storage while ensuring that storage cost is optimized. What should you do? (Choose two.)

  • ASet a retention policy on the bucket with a period of 7 years. (correct answer)
  • BUse IAM Conditions to provide access to objects 7 years after the object creation date.
  • CEnable Object Versioning to prevent objects from being accidentally deleted for 7 years after object creation.
  • DCreate an object lifecycle policy on the bucket that moves objects from Standard Storage to Archive Storage after 3 years. (correct answer)
  • EImplement a Cloud Function that checks the age of each object in the bucket and moves the objects older than 3 years to a second bucket with the Archive Storage class. Use Cloud Scheduler to trigger the Cloud Function on a daily schedule.
Reveal answer & explanation
Correct answer: A, D

The correct answer is A, D. Option A: Set a retention policy on the bucket with a period of 7 years. Option D: Create an object lifecycle policy on the bucket that moves objects from Standard Storage to Archive Storage after 3 years.

Topic 1 Β· Question 194

You are developing an application using different microservices that must remain internal to the cluster. You want the ability to configure each microservice with a specific number of replicas. You also want the ability to address a specific microservice from any other microservice in a uniform way, regardless of the number of replicas the microservice scales to. You plan to implement this solution on Google Kubernetes Engine. What should you do?

  • ADeploy each microservice as a Deployment. Expose the Deployment in the cluster using a Service, and use the Service DNS name to address it from other microservices within the cluster. (correct answer)
  • BDeploy each microservice as a Deployment. Expose the Deployment in the cluster using an Ingress, and use the Ingress IP address to address the Deployment from other microservices within the cluster.
  • CDeploy each microservice as a Pod. Expose the Pod in the cluster using a Service, and use the Service DNS name to address the microservice from other microservices within the cluster.
  • DDeploy each microservice as a Pod. Expose the Pod in the cluster using an Ingress, and use the Ingress IP address to address the Pod from other microservices within the cluster.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Deploy each microservice as a Deployment. Expose the Deployment in the cluster using a Service, and use the Service DNS name to address it from other microservices within the cluster.

Topic 1 Β· Question 195

You are building an application that uses a distributed microservices architecture. You want to measure the performance and system resource utilization in one of the microservices written in Java. What should you do?

  • AInstrument the service with Cloud Profiler to measure CPU utilization and method-level execution times in the service. (correct answer)
  • BInstrument the service with Debugger to investigate service errors.
  • CInstrument the service with Cloud Trace to measure request latency.
  • DInstrument the service with OpenCensus to measure service latency, and write custom metrics to Cloud Monitoring.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Instrument the service with Cloud Profiler to measure CPU utilization and method-level execution times in the service.

Explanation

Cloud Profiler continuously analyzes CPU and memory usage of production code.

Topic 1 Β· Question 196

Your team is responsible for maintaining an application that aggregates news articles from many different sources. Your monitoring dashboard contains publicly accessible real-time reports and runs on a Compute Engine instance as a web application. External stakeholders and analysts need to access these reports via a secure channel without authentication. How should you configure this secure channel?

  • AAdd a public IP address to the instance. Use the service account key of the instance to encrypt the traffic.
  • BUse Cloud Scheduler to trigger Cloud Build every hour to create an export from the reports. Store the reports in a public Cloud Storage bucket.
  • CAdd an HTTP(S) load balancer in front of the monitoring dashboard. Configure Identity-Aware Proxy to secure the communication channel.
  • DAdd an HTTP(S) load balancer in front of the monitoring dashboard. Set up a Google-managed SSL certificate on the load balancer for traffic encryption. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Add an HTTP(S) load balancer in front of the monitoring dashboard. Set up a Google-managed SSL certificate on the load balancer for traffic encryption.

Explanation

A load balancer distributes traffic across healthy backends in multiple zones for availability and scale. This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 197

You are planning to add unit tests to your application. You need to be able to assert that published Pub/Sub messages are processed by your subscriber in order. You want the unit tests to be cost-effective and reliable. What should you do?

  • AImplement a mocking framework.
  • BCreate a topic and subscription for each tester.
  • CAdd a filter by tester to the subscription.
  • DUse the Pub/Sub emulator. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Use the Pub/Sub emulator.

Explanation

Pub/Sub is a serverless, global messaging service that decouples services and ingests high-volume event streams. This option delivers the requirement at the lowest cost.

Topic 1 Β· Question 198

You have an application deployed in Google Kubernetes Engine (GKE) that reads and processes Pub/Sub messages. Each Pod handles a fixed number of messages per minute. The rate at which messages are published to the Pub/Sub topic varies considerably throughout the day and week, including occasional large batches of messages published at a single moment. You want to scale your GKE Deployment to be able to process messages in a timely manner. What GKE feature should you use to automatically adapt your workload?

  • AVertical Pod Autoscaler in Auto mode
  • BVertical Pod Autoscaler in Recommendation mode
  • CHorizontal Pod Autoscaler based on an external metric (correct answer)
  • DHorizontal Pod Autoscaler based on resources utilization
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Horizontal Pod Autoscaler based on an external metric.

Topic 1 Β· Question 199

You are using Cloud Run to host a web application. You need to securely obtain the application project ID and region where the application is running and display this information to users. You want to use the most performant approach. What should you do?

  • AUse HTTP requests to query the available metadata server at the http://metadata.google.internal/ endpoint with the Metadata-Flavor: Google header. (correct answer)
  • BIn the Google Cloud console, navigate to the Project Dashboard and gather configuration details. Navigate to the Cloud Run β€œVariables & Secrets” tab, and add the desired environment variables in Key:Value format.
  • CIn the Google Cloud console, navigate to the Project Dashboard and gather configuration details. Write the application configuration information to Cloud Run's in-memory container filesystem.
  • DMake an API call to the Cloud Asset Inventory API from the application and format the request to include instance metadata.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Use HTTP requests to query the available metadata server at the http://metadata.google.internal/ endpoint with the Metadata-Flavor: Google header.

Topic 1 Β· Question 200

You need to deploy resources from your laptop to Google Cloud using Terraform. Resources in your Google Cloud environment must be created using a service account. Your Cloud Identity has the roles/iam.serviceAccountTokenCreator Identity and Access Management (IAM) role and the necessary permissions to deploy the resources using Terraform. You want to set up your development environment to deploy the desired resources following Google-recommended best practices. What should you do?

  • A1. Download the service account’s key file in JSON format, and store it locally on your laptop.2. Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of your downloaded key file.
  • B1. Run the following command from a command line: gcloud config set auth/impersonate_service_account [email protected].2. Set the GOOGLE_OAUTH_ACCESS_TOKEN environment variable to the value that is returned by the gcloud auth print-access-token command. (correct answer)
  • C1. Run the following command from a command line: gcloud auth application-default login.2. In the browser window that opens, authenticate using your personal credentials.
  • D1. Store the service account's key file in JSON format in Hashicorp Vault.2. Integrate Terraform with Vault to retrieve the key file dynamically, and authenticate to Vault using a short-lived access token.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: 1. Run the following command from a command line: gcloud config set auth/impersonate_service_account [email protected].2. Set the GOOGLE_OAUTH_ACCESS_TOKEN environment variable to the value that is returned by the gcl...

Showing questions 181–200 of 359 Β· Page 10 of 18