Google Associate Cloud Engineer Question 268
Single answerGoogle Cloud PlatformYou are a Google Cloud Engineer managing a VPC network. You need to expand an existing subnet to accommodate more IP addresses for a growing application. What steps should you take to achieve this while minimizing downtime?
- A
Delete the existing subnet and create a new one with a larger CIDR range.
- B
Modify the subnet's CIDR range directly from the Google Cloud Console.
- C
Create a new subnet with a larger CIDR range and migrate resources to it.
- D
Expand the CIDR range of the existing subnet using the gcloud command.
Show answer and explanation
Correct answer: C
Explanation
In Google Cloud, you cannot directly modify or expand the CIDR range of an existing subnet. To accommodate more IP addresses, the recommended approach is to create a new subnet with the desired larger CIDR range and strategically migrate resources to it. This method allows for expansion while minimizing service disruption.
- A. Incorrect.
Deleting the existing subnet would cause downtime and require reconfiguration of resources, which is not ideal.
- B. Incorrect.
Subnets' CIDR ranges cannot be modified directly once created in Google Cloud; this is not a feasible option.
- C. Correct.
Creating a new subnet with a larger CIDR range and migrating resources involves careful planning but minimizes downtime.
- D. Incorrect.
Google Cloud does not support expanding the CIDR range of an existing subnet directly using the gcloud command.