Google

Professional Cloud Developer Free Practice Questions — Page 14

Question 131

You are reviewing and updating your Cloud Build steps to adhere to best practices. Currently, your build steps include: 1. Pull the source code from a source repository. 2. Build a container image 3. Upload the built image to Artifact Registry. You need to add a step to perform a vulnerability scan of the built container image, and you want the results of the scan to be available to your deployment pipeline running in Google Cloud. You want to minimize changes that could disrupt other teams’ processes. What should you do?

A. Enable Binary Authorization, and configure it to attest that no vulnerabilities exist in a container image.
B. Upload the built container images to your Docker Hub instance, and scan them for vulnerabilities.
C. Enable the Container Scanning API in Artifact Registry, and scan the built container images for vulnerabilities.
D. Add Artifact Registry to your Aqua Security instance, and scan the built container images for vulnerabilities.
Show Answer
Correct Answer: C
Explanation:
The goal is to add vulnerability scanning with minimal disruption and have results available to a Google Cloud–based deployment pipeline. Artifact Registry’s built-in container vulnerability scanning (via the Container Scanning API) automatically scans images upon upload, requires no major pipeline changes, and integrates natively with Google Cloud security tools. The scan results are stored in Google Cloud and can be consumed by downstream deployment or policy tools. Other options either add external dependencies, are not primarily vulnerability scanners, or introduce more process changes.

Question 132

You need to load-test a set of REST API endpoints that are deployed to Cloud Run. The API responds to HTTP POST requests. Your load tests must meet the following requirements: • Load is initiated from multiple parallel threads. • User traffic to the API originates from multiple source IP addresses. • Load can be scaled up using additional test instances. You want to follow Google-recommended best practices. How should you configure the load testing?

A. Create an image that has cURL installed, and configure cURL to run a test plan. Deploy the image in a managed instance group, and run one instance of the image for each VM.
B. Create an image that has cURL installed, and configure cURL to run a test plan. Deploy the image in an unmanaged instance group, and run one instance of the image for each VM.
C. Deploy a distributed load testing framework on a private Google Kubernetes Engine cluster. Deploy additional Pods as needed to initiate more traffic and support the number of concurrent users.
D. Download the container image of a distributed load testing framework on Cloud Shell. Sequentially start several instances of the container on Cloud Shell to increase the load on the API.
Show Answer
Correct Answer: C
Explanation:
The requirements call for Google‑recommended best practices, parallel load generation, multiple source IPs, and horizontal scalability. Google’s official guidance for load testing Cloud Run recommends a distributed load‑testing framework running on GKE. A GKE cluster allows you to run many Pods in parallel (threads/users), scale out easily by adding Pods or nodes, and generate traffic from multiple source IP addresses because traffic originates from multiple nodes. Cloud Shell is not designed as a scalable load‑generation platform, and running containers there is explicitly not a best practice for sustained or distributed load testing. Managed or unmanaged VM approaches with cURL lack built‑in distributed coordination and are not the recommended pattern in Google documentation. Therefore, option C best meets all requirements and aligns with Google guidance.

Question 133

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. How should HipLocal increase their API development speed while continuing to provide the QA team with a stable testing environment that meets feature requirements?

A. Include unit tests in their code, and prevent deployments to QA until all tests have a passing status.
B. Include performance tests in their code, and prevent deployments to QA until all tests have a passing status.
C. Create health checks for the QA environment, and redeploy the APIs at a later time if the environment is unhealthy.
D. Redeploy the APIs to App Engine using Traffic Splitting. Do not move QA traffic to the new versions if errors are found.
Show Answer
Correct Answer: A
Explanation:
To increase API development speed while keeping QA stable, HipLocal should add automated unit tests and gate deployments to QA on passing results. Unit tests catch regressions early, reduce QA churn, and allow faster iteration without destabilizing the QA environment. Performance tests and health checks do not ensure functional correctness, and traffic splitting addresses production rollout, not QA stability.

Question 134

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?

A. Create 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.
B. Migrate data to Bigtable. Instruct the development teams to use the Cloud SDK to emulate a local Bigtable development environment.
C. Move 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.
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.
Show Answer
Correct Answer: D
Explanation:
The core problem is frequent schema changes and lack of suitable test environments, which slows development while the company expands into new European regions. Firestore in Native mode is a schema-less, managed database, allowing teams to add new fields without disruptive schema migrations. It supports multi-region deployment with data residency controls, which helps meet GDPR requirements by keeping EU data in Europe. Firestore has a local emulator via the Cloud SDK, enabling developers to test changes quickly without complex infrastructure. As a fully managed service, it also reduces infrastructure management effort and aligns with Google-recommended cloud practices.

Question 135

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?

A. Migrate the database to Bigtable and use it to serve all global user traffic.
B. Migrate the database to Cloud Spanner and use it to serve all global user traffic.
C. Migrate the database to Firestore in Datastore mode and use it to serve all global user traffic.
D. Migrate the services to Google Kubernetes Engine and use a load balancer service to better scale the application.
Show Answer
Correct Answer: B
Explanation:
To reduce latency for all database interactions globally with the least effort, HipLocal needs a database that provides multi-region, strongly consistent reads and writes. Cloud Spanner is a globally distributed relational database that supports horizontal scaling and low-latency access across regions, while preserving SQL semantics similar to MySQL. Bigtable and Firestore are non-relational and would require significant application redesign. Migrating services to GKE does not address database latency. Therefore, Cloud Spanner is the best fit.

Question 136

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's application uses Cloud Client Libraries to interact with Google Cloud. HipLocal needs to configure authentication and authorization in the Cloud Client Libraries to implement least privileged access for the application. What should they do?

A. Create an API key. Use the API key to interact with Google Cloud.
B. Use the default compute service account to interact with Google Cloud.
C. Create a service account for the application. Export and deploy the private key for the application. Use the service account to interact with Google Cloud.
D. Create a service account for the application and for each Google Cloud API used by the application. Export and deploy the private keys used by the application. Use the service account with one Google Cloud API to interact with Google Cloud.
Show Answer
Correct Answer: C
Explanation:
To implement least-privileged authentication and authorization with Cloud Client Libraries, the application should use a dedicated service account with only the required IAM roles. API keys do not provide IAM-based access control, the default Compute Engine service account is overly permissive by default, and creating separate service accounts per API is unnecessary and overly complex. A single application-specific service account best represents the workload and supports least privilege.

Question 137

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. How should HipLocal redesign their architecture to ensure that the application scales to support a large increase in users?

A. Use Google Kubernetes Engine (GKE) to run the application as a microservice. Run the MySQL database on a dedicated GKE node.
B. Use multiple Compute Engine instances to run MySQL to store state information. Use a Google Cloud-managed load balancer to distribute the load between instances. Use managed instance groups for scaling.
C. Use Memorystore to store session information and CloudSQL to store state information. Use a Google Cloud-managed load balancer to distribute the load between instances. Use managed instance groups for scaling.
D. Use a Cloud Storage bucket to serve the application as a static website, and use another Cloud Storage bucket to store user state information.
Show Answer
Correct Answer: C
Explanation:
The goal is to scale to many more users using Google-recommended managed services while reducing operational overhead. Option C replaces the single MySQL instance with Cloud SQL, which is a managed, scalable, and compliant database service. It offloads session state to Memorystore (Redis), enabling stateless application instances that can scale horizontally. Using managed instance groups with a Google Cloud-managed load balancer allows automatic scaling and high availability across regions. The other options rely on self-managed databases or inappropriate storage choices, which do not meet best practices or scalability requirements.

Question 138

Your company’s development teams want to use various open source operating systems in their Docker builds. When images are created in published containers in your company’s environment, you need to scan them for Common Vulnerabilities and Exposures (CVEs). The scanning process must not impact software development agility. You want to use managed services where possible. What should you do?

A. Enable the Vulnerability scanning setting in the Container Registry.
B. Create a Cloud Function that is triggered on a code check-in and scan the code for CVEs.
C. Disallow the use of non-commercially supported base images in your development environment.
D. Use Cloud Monitoring to review the output of Cloud Build to determine whether a vulnerable version has been used.
Show Answer
Correct Answer: A
Explanation:
Enabling vulnerability scanning in the container registry provides a fully managed way to automatically scan container images for known CVEs when they are pushed. This meets the requirement to scan published images, supports open source base images, minimizes operational overhead, and does not slow down development workflows. The other options either add custom processes, restrict developer flexibility, or do not perform actual vulnerability scanning.

Question 139

You are developing a microservice-based application that will run on Google Kubernetes Engine (GKE). Some of the services need to access different Google Cloud APIs. How should you set up authentication of these services in the cluster following Google-recommended best practices? (Choose two.)

A. Use the service account attached to the GKE node.
B. Enable Workload Identity in the cluster via the gcloud command-line tool.
C. Access the Google service account keys from a secret management service.
D. Store the Google service account keys in a central secret management service.
E. Use gcloud to bind the Kubernetes service account and the Google service account using roles/iam.workloadIdentity.
Show Answer
Correct Answer: B, E
Explanation:
Google-recommended best practice for authenticating workloads on GKE to Google Cloud APIs is to use Workload Identity. This requires enabling Workload Identity on the cluster and binding Kubernetes service accounts to Google service accounts with the roles/iam.workloadIdentityUser role. This approach avoids using long-lived service account keys, supports least privilege per service, and provides better security and auditability.

Question 140

The new version of your containerized application has been tested and is ready to deploy to production on Google Kubernetes Engine. You were not able to fully load-test the new version in pre-production environments, and you need to make sure that it does not have performance problems once deployed. Your deployment must be automated. What should you do?

A. Use Cloud Load Balancing to slowly ramp up traffic between versions. Use Cloud Monitoring to look for performance issues.
B. Deploy the application via a continuous delivery pipeline using canary deployments. Use Cloud Monitoring to look for performance issues. and ramp up traffic as the metrics support it.
C. Deploy the application via a continuous delivery pipeline using blue/green deployments. Use Cloud Monitoring to look for performance issues, and launch fully when the metrics support it.
D. Deploy the application using kubectl and set the spec.updateStrategv.type to RollingUpdate. Use Cloud Monitoring to look for performance issues, and run the kubectl rollback command if there are any issues.
Show Answer
Correct Answer: B
Explanation:
You could not fully load-test beforehand, so you need to minimize risk in production by gradually exposing real traffic and observing performance. A canary deployment through an automated continuous delivery pipeline allows you to send a small percentage of traffic to the new version, monitor metrics with Cloud Monitoring, and progressively ramp up traffic only if the application performs well. This directly satisfies the requirements for automation and safe validation under real production load. Blue/green shifts too abruptly, rolling updates via kubectl are not a full automated CD strategy, and Cloud Load Balancing alone does not provide deployment control.

$19

Get all 357 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.