An organization is deploying a custom VPC network environment in Google Cloud for a multi-tier application stack. A cloud engineer must create a custom subnet named `prod-app-subnet` in the `us-central1` region that includes a primary IPv4 range for Compute Engine Virtual Machines and a secondary IPv4 range reserved for GKE Pod alias IPs. Additionally, ingress TCP traffic on port 5432 (PostgreSQL) must be restricted specifically to target instances operating under a dedicated service account `[email protected]`. Which TWO actions or parameters are required to properly implement this configuration using Google Cloud best practices? (Select TWO.)
- Execute `gcloud compute networks subnets create prod-app-subnet` specifying `--range` for the primary internal IP allocation and `--secondary-range` to define the named subnetwork range for Pod alias IPs.Cevap
- Configure the VPC ingress firewall rule with `--target-service-accounts=db-client-sa@proj-id.iam.gserviceaccount.com` to enforce strict identity-based access control rather than relying on network tags.Cevap
- CSet the ingress database firewall rule priority value to 65535 to guarantee that it overrides all existing default network ingress allow and deny rules.
- DGrant the primitive Owner role (`roles/owner`) to `[email protected]` so that target VMs are granted implicit permission to bypass VPC ingress firewall filtering.
Cevap
The correct configuration requires provisioning the subnet with both primary (`--range`) and secondary (`--secondary-range`) IP allocation flags, and applying `--target-service-accounts` on the ingress firewall rule to enforce identity-targeted network access.
Deploying custom VPC subnets with secondary IP allocations requires using `--range` for the main CIDR and `--secondary-range` for alias IP ranges. Restricting access based on instance identity requires using `--target-service-accounts` on the firewall rule rather than network tags.
Adım Adım Çözüm
Anahtar Kavram
Provisioning custom VPC subnets with secondary IP ranges and defining identity-based firewall rules using service accounts.