Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 379 of 481

Professional Cloud Developer. Professional level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud Developer Question 379

Select 2Google Cloud Platform

You are deploying a containerized workload to Google Kubernetes Engine (GKE). The workload requires a minimum of 2 CPU cores and 4 GB of memory to run properly. Additionally, the workload should scale efficiently under increased load. How should you define the resource specifications for this workload to ensure proper behavior and scalability?

  1. A

    Set the resource requests to 2 CPU cores and 4 GB of memory while leaving resource limits undefined.

  2. B

    Set the resource requests to 1 CPU core and 2 GB of memory to allow flexibility, and set resource limits to 4 CPU cores and 8 GB of memory.

  3. C

    Set the resource requests to 2 CPU cores and 4 GB of memory and resource limits to 4 CPU cores and 8 GB of memory.

  4. D

    Set the resource limits to 2 CPU cores and 4 GB of memory while leaving resource requests undefined.

  5. E

    Do not define resource requests or limits to allow Kubernetes to manage resource allocation dynamically.

Show answer and explanation

Correct answers: A, C

Explanation

To ensure proper behavior and scalability of a workload in GKE, you must define both resource requests and limits. Resource requests guarantee the minimum resources needed for the workload to run, while resource limits define the maximum resources it can consume. Option 1 provides a flexible approach but risks resource contention, while Option 3 provides a balanced configuration ensuring both proper functioning and scalability.

  • A. Correct.

    This option ensures that the workload has the minimum required resources (2 CPU cores and 4 GB of memory) to function properly, and leaving limits undefined allows Kubernetes to allocate additional resources as needed. However, not defining limits may lead to resource contention in a shared cluster.

  • B. Incorrect.

    This option sets the requests lower than the actual resource needs, which could lead to under-provisioning and performance issues. Although limits are defined, the requests are insufficient to ensure the workload runs properly.

  • C. Correct.

    This option is correct because it defines the minimum resources needed (2 CPU cores and 4 GB of memory) using requests, and sets limits (4 CPU cores and 8 GB of memory) to control the maximum resources the workload can consume. This ensures both proper operation and scalability under load.

  • D. Incorrect.

    Leaving resource requests undefined can lead to scheduling issues because Kubernetes cannot guarantee the workload will have the minimum required resources to run. Defining only limits does not solve this problem.

  • E. Incorrect.

    Not defining resource requests or limits is not recommended for production workloads, as it can lead to unpredictable behavior, resource contention, and potential failure to meet workload requirements.

Timed practice exam

Take a Google Professional Cloud Developer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam