Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Associate Cloud Engineer practice bank has an additional 2,014 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your organization operates a custom mode VPC network in Google Cloud. A production subnet named prod-subnet located in the us-east1 region has an existing primary CIDR range of 10.2.0.0/24. Due to application scaling, the subnet is running out of available private IP addresses.
You need to expand the subnet capacity to a /20 prefix length to accommodate new Compute Engine virtual machines without causing service disruption or restarting existing instances.
Which command should you execute?
The gcloud compute networks subnets update command is used to modify specific configuration attributes of an existing subnet, such as enabling Private Google Access, modifying flow logging parameters, or updating secondary ranges.
update command does not accept a --range flag for changing the primary IPv4 CIDR block. Google Cloud separates general subnet attribute updates from CIDR block expansion.expand-ip-range command.gcloud compute networks subnets command group.The objective was to update subnet feature flags, such as executing gcloud compute networks subnets update prod-subnet --region=us-east1 --enable-private-ip-google-access to allow private communication with Google APIs.
The gcloud compute networks subnets expand-ip-range command is the dedicated Google Cloud CLI tool designed specifically to increase the IP address space of an existing VPC subnet non-disruptively.
/20: Specifying --prefix-length=20 expands the mask from /24 (256 addresses) to /20 (4,096 addresses), dramatically increasing available IP addresses for new VM instances.prod-subnet directly within the --region=us-east1 scope.Using expand-ip-range with --prefix-length is the official Google Cloud practice for increasing a primary subnet's address space. It provides an instantaneous, atomic update that requires no infrastructure rebuilds or workload migrations.
This approach attempts to recreate the subnet from scratch by first deleting the existing prod-subnet resource and then creating a brand-new subnet with the desired /20 CIDR block.
delete command will fail immediately with a resource dependency error.The subnet contained no active resources, was deployed in an incorrect region or mode, and needed to be decommissioned and recreated as part of an initial greenfield environment setup.
This command adds a secondary IP address range to the specified subnet rather than expanding the primary IPv4 address range.
nic0) of standard Compute Engine VMs must draw their primary internal IP addresses from the subnet's primary CIDR range, not from secondary ranges.10.2.0.0/20) includes the existing primary range (10.2.0.0/24), which will cause an IP address overlap error in Google Cloud./24), blocking further standard VM provisioning.The objective was to configure a secondary IP range to host GKE Pods or multi-IP alias configurations within an existing Kubernetes cluster environment.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated