Tüm alıştırma soruları

1591 soru

Soru 821Soru

A digital video streaming network generates automated closed-caption text files immediately after new broadcast episodes air. During the first 30 days, localization teams frequently read and modify these caption files. Between day 31 and day 365, access drops to infrequent reference checks (less than once per month). Beyond 365 days, the files are rarely accessed but must be retained for 5 years for compliance. Which TWO Cloud Storage bucket and lifecycle configuration strategies should you implement to optimize costs?

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Set the default storage class of the Cloud Storage bucket to Standard for newly ingested caption files.; Configure an Object Lifecycle Management rule to transition objects to Nearline storage after 30 days and to Archive storage after 365 days.

Cevap

The correct strategies are to set the bucket default storage class to Standard for initial ingestion and active modification, and to configure Object Lifecycle Management rules transitioning objects to Nearline storage after 30 days and to Archive storage after 365 days.
Selecting Standard storage for the first 30 days ensures zero retrieval costs while localization teams actively work on the caption files. Transitioning objects to Nearline storage after 30 days and Archive storage after 365 days aligns perfectly with Cloud Storage minimum duration requirements (30 days for Nearline, 365 days for Archive) and optimizes Total Cost of Ownership across the 5-year retention lifecycle.

Adım Adım Çözüm

1
Analyze access pattern for the initial 30-day period.
Frequent reads and updates occur during localization.
Standard storage provides the lowest cost for actively accessed data because it carries zero data retrieval fees.
2
Analyze access pattern from day 31 to day 365.
Access drops to infrequent reference checks (<1/month).
Nearline storage is designed for data accessed less than once a month and has a 30-day minimum storage duration.
3
Analyze access pattern after day 365.
Data is retained for 5-year compliance with rare access expected.
Archive storage offers the lowest per-gigabyte storage cost for long-term retention and has a 365-day minimum storage duration commitment.

Anahtar Kavram

Matching Cloud Storage Classes and Lifecycle Rules to Data Access Patterns
Soru 822Soru

A systems administrator needs to deploy a high-availability Cloud SQL for MySQL database instance that is accessible exclusively using Private IP from an existing Virtual Private Cloud (VPC) network named `internal-vpc`. Which two configurations or procedures must be executed to satisfy these requirements? (Select TWO answers.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Create a private services access connection by allocating an IP address range and establishing VPC network peering with Google services inside `internal-vpc`.; Provision the Cloud SQL instance using `gcloud sql instances create` with the `--availability-type=REGIONAL`, `--network=internal-vpc`, and `--no-assign-ip` flags.

Cevap

To deploy a high-availability Cloud SQL instance accessible only via Private IP, you must establish a private services access connection (VPC network peering) in `internal-vpc` and create the Cloud SQL instance using the `--availability-type=REGIONAL`, `--network=internal-vpc`, and `--no-assign-ip` flags.
Deploying a high-availability Cloud SQL instance on Private IP requires two key steps: first, establishing a private services access connection (allocating an IP block and peering the VPC), and second, provisioning the database instance with regional availability (`--availability-type=REGIONAL`) linked to the VPC network (`--network`) without a public IP (`--no-assign-ip`).

Adım Adım Çözüm

1
Configure Private Services Access in the VPC
An IP range is allocated and VPC Network Peering is configured between the custom VPC (`internal-vpc`) and Google's internal service producer network.
Cloud SQL managed instances run inside a Google-managed VPC, requiring Private Service Access peering to communicate directly over internal IP addresses.
2
Deploy the Regional Cloud SQL Instance with Private IP Flags
The database instance is provisioned with a regional HA architecture (primary and standby instances in different zones) and disabled public IP address.
Passing `--availability-type=REGIONAL` ensures multi-zone high availability, while `--no-assign-ip` and `--network` ensure traffic travels exclusively over the private network.

Anahtar Kavram

Cloud SQL High Availability and Private IP Provisioning
Soru 823Soru

A cloud engineer is deploying a high-availability production Cloud SQL for MySQL instance named `prod-mysql-db` inside a custom Virtual Private Cloud (VPC) network named `corp-vpc`. Security governance dictates that the database instance must strictly use Private IP connectivity without any public IP interface allocated, and must support automatic multi-zone failover. Which TWO configuration steps must be performed to satisfy these requirements?

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Allocate an internal IP address range and establish a Private Services Access connection (VPC network peering) between `corp-vpc` and the Service Networking network prior to creating the instance.; Execute `gcloud sql instances create prod-mysql-db` with the flags `--availability-type=REGIONAL`, `--no-assign-ip`, and `--network=corp-vpc`.

Cevap

To successfully deploy a high-availability Cloud SQL instance restricted to Private IP, an engineer must first set up a Private Services Access connection (VPC peering) between the host network and the Service Networking tenant project. Subsequently, the gcloud deployment command must specify `--availability-type=REGIONAL` for HA failover support, along with `--no-assign-ip` and `--network=corp-vpc` to enforce private network routing without exposing a public IP.
Deploying a Cloud SQL instance with Private IP connectivity requires a pre-existing Private Services Access connection (VPC Peering) on the custom VPC. For high availability, Cloud SQL instances must be provisioned with `--availability-type=REGIONAL`, which places primary and standby instances in distinct zones. Disabling public IP exposure requires explicit usage of the `--no-assign-ip` flag during CLI creation.

Adım Adım Çözüm

1
Set up private connectivity infrastructure
Allocate an IP range and configure Private Services Access on `corp-vpc` so Cloud SQL can assign an internal IP address via VPC Peering.
Cloud SQL managed instances reside in a Google-managed VPC tenant project and require Private Services Access peering to communicate privately with a customer VPC.
2
Provision the Cloud SQL instance with regional HA and private networking flags
Run the `gcloud sql instances create` command including `--availability-type=REGIONAL`, `--no-assign-ip`, and `--network=corp-vpc`.
REGIONAL availability configures a primary and standby replica across different zones for automated failover, while `--no-assign-ip` disables public IPv4 attachment.

Anahtar Kavram

Cloud SQL Private IP Deployment and High Availability Configuration
Soru 824Soru

A financial application deployed on a GKE Standard cluster relies on a Horizontal Pod Autoscaler (HPA) to scale Pod replicas from 4 to 40 during high-traffic trading hours. During a recent market volatility event, HPA triggered scaling, but newly created web Pods remained stuck in a `Pending` state for over 15 minutes due to insufficient CPU capacity on existing cluster nodes. Additionally, the operations team plans to run batch analytics workloads on a dedicated cost-optimized Spot VM node pool, but must prevent latency-sensitive web Pods from being scheduled on these Spot nodes. Which combination of operations correctly resolves the node starvation issue and isolates the batch workloads?

Cevabı ve açıklamayı göster

Cevap: Enable Cluster Autoscaler on the web workload node pool using `gcloud container node-pools update --enable-autoscaling`, then add a taint to the Spot VM node pool and configure matching tolerations on the batch workload Pod manifests.

Cevap

Enable Cluster Autoscaler on the web workload node pool using gcloud container node-pools update --enable-autoscaling, add a taint to the Spot VM node pool, and specify matching tolerations on the batch job Pod manifests.
When Pods remain in a Pending state due to lack of cluster CPU, infrastructure-level autoscaling is required. Enabling Cluster Autoscaler on the GKE node pool allows GKE to automatically resize Compute Engine nodes. Applying taints to the Spot node pool and adding matching tolerations to batch workloads ensures that latency-sensitive microservices are never scheduled on interruptible Spot instances.

Adım Adım Çözüm

1
Diagnose the root cause of `Pending` Pods during scaling events.
HPA increases Pod replica count based on metrics, but if physical node capacity (CPU/RAM) is exhausted, Pods remain Unschedulable until Cluster Autoscaler provisions additional nodes.
HPA handles application layer scaling while Cluster Autoscaler handles infrastructure layer scaling.
2
Enable infrastructure autoscaling for node capacity.
Execute `gcloud container node-pools update <pool_name> --enable-autoscaling --min-nodes=<min> --max-nodes=<max> --cluster=<cluster_name>`.
This grants GKE authority to automatically add GCE instances when Pods are unschedulable.
3
Enforce workload isolation for Spot VM instances.
Apply a node taint to the Spot VM node pool (`gcloud container node-pools create/update --node-taints=key=value:NoSchedule`), and add a corresponding `tolerations` section to batch job YAML definitions.
Taints repel Pods that do not possess explicit tolerations, safeguarding production web services from being scheduled on interruptible Spot VMs.

Anahtar Kavram

Dual-layer autoscaling (HPA for Pods, Cluster Autoscaler for Nodes) combined with node taints and tolerations for workload isolation.
Soru 825Soru

An operations team needs to test a new container image for an existing Cloud Run service named `order-service`. They want to deploy the new revision without automatically directing live user traffic to it, and then split incoming requests so that 10% goes to the new revision while 90% remains on the previous revision (`order-service-00001`). Which TWO gcloud CLI commands should they execute to accomplish this? (Select TWO answers.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Execute `gcloud run deploy order-service --image=gcr.io/my-project/order-service:v2 --no-traffic` to create the new revision without sending traffic to it.; Execute `gcloud run services update-traffic order-service --to-revisions=order-service-00001=90,order-service-00002=10` to divide incoming traffic between the two revisions.

Cevap

The team should execute `gcloud run deploy order-service --image=gcr.io/my-project/order-service:v2 --no-traffic` to create the new revision safely without routing traffic, followed by `gcloud run services update-traffic order-service --to-revisions=order-service-00001=90,order-service-00002=10` to set the 90/10 traffic allocation.
Deploying with `--no-traffic` creates the revision in isolation without routing incoming user requests to it. Following up with `gcloud run services update-traffic` using `--to-revisions` allows administrators to explicitly define percentage traffic distribution across revisions.

Adım Adım Çözüm

1
Deploy the updated container image to Cloud Run using the `--no-traffic` flag.
A new Cloud Run revision (`order-service-00002`) is created while 100% of live traffic remains on the previous revision.
By default, `gcloud run deploy` routes 100% of traffic to the newly deployed revision unless `--no-traffic` is specified.
2
Execute `gcloud run services update-traffic` with the `--to-revisions` parameter specifying percentage splits for each target revision.
Incoming traffic is partitioned according to the requested percentages (90% to revision 00001 and 10% to revision 00002).
Traffic splitting between specific revisions requires explicit target revision identifiers and percentage values.

Anahtar Kavram

Cloud Run revision deployment and gradual traffic splitting management using gcloud CLI.
Soru 826Soru

Your organization wants to allow a junior administrator to perform basic operational tasks on Compute Engine virtual machines, such as starting, stopping, and resetting instances, without granting full project administration rights. Following Google Cloud best practices for security and access control, which predefined IAM role should you assign to the administrator?

Cevabı ve açıklamayı göster

Cevap: Compute Instance Admin (v1)

Cevap

Assign the Compute Instance Admin (v1) predefined role to grant instance management capabilities without excessive administrative privileges.
The Compute Instance Admin (v1) role provides full control over Compute Engine instances, including permissions to create, start, stop, and restart VMs, while restricting control to instance resources specifically.

Adım Adım Çözüm

1
Identify the operational requirement.
The administrator needs permissions to start, stop, and reset Compute Engine virtual machines.
Determines the specific IAM permissions required for daily VM lifecycle operations.
2
Apply Google Cloud IAM best practices.
Select a predefined role rather than a broad primitive role (Owner/Editor) to maintain least privilege.
Predefined roles restrict permissions to a specific service or resource type.
3
Select the appropriate Compute Engine role.
Compute Instance Admin (v1) provides full management rights over Compute Engine instances.
Fulfills all lifecycle management requirements while restricting access to non-compute project resources.

Anahtar Kavram

Managing Compute Engine IAM Roles and Access Control
Soru 827Soru

A cloud engineer is tasked with deploying an event-driven Go microservice using Google Cloud Functions (2nd gen). The function must execute whenever a new object is created in a Cloud Storage bucket in the project. To adhere to security best practices and ensure successful event delivery, several setup and deployment tasks must be performed in sequence. Arrange the operational steps below in the correct logical execution sequence from first to last.

Öğeleri doğru sıraya koymak için sürükleyin

Cevabı ve açıklamayı göster

Cevap

The correct sequence of deployment steps is: 1) Enable the required Google Cloud APIs (Cloud Functions, Cloud Build, Artifact Registry, Eventarc, Cloud Run); 2) Create a dedicated user-managed service account for runtime execution; 3) Grant the Pub/Sub Publisher role (roles/pubsub.publisher) to the Cloud Storage system service account; 4) Execute the gcloud functions deploy command specifying the 2nd gen environment, event filters, storage bucket, and runtime service account.
The correct order follows fundamental GCP infrastructure dependency rules. First, project-level APIs (Cloud Functions, Cloud Build, Artifact Registry, Eventarc, Cloud Run) must be enabled. Second, the user-managed runtime service account must be created so it can be referenced in configurations. Third, IAM permissions permitting the Cloud Storage service account to publish events (`roles/pubsub.publisher`) must be granted so Eventarc event delivery functions properly. Finally, the function is deployed using `gcloud functions deploy --gen2` referencing the bucket event filters and runtime service account.

Adım Adım Çözüm

1
Enable requisite Google Cloud APIs
Cloud Functions, Cloud Build, Artifact Registry, Eventarc, and Cloud Run APIs are active.
Cloud Functions (2nd gen) builds container images via Cloud Build, stores them in Artifact Registry, and runs them on Cloud Run while listening to events through Eventarc. Enabling these APIs is the mandatory prerequisite.
2
Provision a dedicated user-managed service account
A specific service account identity is created.
Following the principle of least privilege, a dedicated identity is needed so the function does not fall back to the default Compute Engine service account.
3
Authorize the Cloud Storage system service account
The Cloud Storage service account gains the roles/pubsub.publisher role.
Cloud Storage relies on Pub/Sub to push audit and storage events to Eventarc triggers. Without granting roles/pubsub.publisher to the Cloud Storage service account (`service-PROJECT_NUMBER@gs-project-accounts.iam.gserviceaccount.com`), event notifications will fail to deliver.
4
Deploy the 2nd gen Cloud Function
The Cloud Function is compiled, built into a container image, and deployed to Cloud Run with an active Eventarc trigger.
With APIs enabled, identities created, and event publisher permissions granted, running `gcloud functions deploy` with `--gen2` completes the build and deployment pipeline.

Anahtar Kavram

Deployment lifecycle and IAM prerequisites for Cloud Functions (2nd gen) with Cloud Storage Eventarc triggers
Tahmini Süre:2m 0s
Soru 828Soru

You are deploying a Global External Application Load Balancer using the gcloud CLI to serve traffic for a Web application running on Compute Engine instance groups. In what sequence must you configure and link the load balancing components from backend to frontend?

Öğeleri doğru sıraya koymak için sürükleyin

Cevabı ve açıklamayı göster

Cevap

The correct sequence for deploying a Global External Application Load Balancer from backend to frontend is: 1) Create the health check and backend service and attach the instance group, 2) Create the URL map referencing the default backend service, 3) Create the target HTTP proxy pointing to the URL map, and 4) Create the global forwarding rule directing external traffic to the target HTTP proxy.
Google Cloud Global External Application Load Balancers follow a strict bottom-up dependencies configuration sequence when deployed via gcloud CLI. First, the health check and backend service are created, and instance groups are added as backends. Second, a URL map is created referencing the backend service. Third, a target HTTP proxy is created referencing the URL map. Finally, a global forwarding rule is created specifying the external IP address and port while targeting the HTTP proxy.

Adım Adım Çözüm

1
Configure backend service and health check
Backend service created with attached health check and instance group.
Higher-level HTTP routing components cannot be instantiated without specifying an existing target backend service.
2
Define URL routing rules
URL map created pointing to the backend service as default.
URL maps require existing backend services to designate host and path routing destinations.
3
Create the target HTTP proxy
Target HTTP proxy bound to the URL map.
Target proxies require an existing URL map to know how to route incoming HTTP traffic.
4
Configure global forwarding rule (Frontend)
Global forwarding rule established with external IP and port binding to the target proxy.
The forwarding rule routes external client traffic to the target proxy and represents the final frontend configuration step.

Anahtar Kavram

GCP Global External Application Load Balancer gcloud bottom-up deployment sequence
Tahmini Süre:1m 30s
Soru 829Soru

An enterprise platform team is developing modular Google Cloud Deployment Manager templates written in Python to dynamically calculate persistent disk allocations and VM custom metadata based on environment variables. A cloud engineer must first inspect the fully expanded resource manifests and dry-run state without actually provisioning infrastructure in Google Cloud. Once the generated configuration is audited and approved, the engineer must commit and provision the resources. Which TWO steps should the cloud engineer take to execute this deployment lifecycle?

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Execute `gcloud deployment-manager deployments create prod-stack --config=config.yaml --preview` to stage and inspect the expanded resource manifest.; Execute `gcloud deployment-manager deployments update prod-stack` after reviewing the preview state to instantiate the planned resources.

Cevap

The cloud engineer should first execute the deployment create command with the `--preview` flag to generate and inspect the template expansion, and then execute the deployment update command on the existing preview deployment to commit and provision the infrastructure.
In Google Cloud Deployment Manager, dry-running template expansion requires using the `--preview` flag in conjunction with the `deployments create` or `deployments update` command. This compiles the Python/Jinja templates into a expanded manifest and saves the deployment in a PREVIEW state. Once the manifest is audited, running `gcloud deployment-manager deployments update [DEPLOYMENT_NAME]` without specifying a new config file commits the previewed deployment and provisions the resources.

Adım Adım Çözüm

1
Use `gcloud deployment-manager deployments create [DEPLOYMENT_NAME] --config=[CONFIG_FILE] --preview`
Deployment Manager parses the configuration files, expands Jinja2 or Python templates, and places the deployment in a PREVIEW state without creating or modifying actual cloud resources.
This allows engineers to inspect the exact manifest and resource parameters before making changes in GCP.
2
Auditing the generated manifest
The engineer verifies that dynamic logic in the Python templates produces the expected disk sizes and VM metadata.
Validates parameterization and resource properties before real resource billing or network creation begins.
3
Execute `gcloud deployment-manager deployments update [DEPLOYMENT_NAME]`
Deployment Manager transitions the deployment from PREVIEW state to active deployment, creating all defined GCP resources.
Running update on a previewed deployment commits the previewed state without requiring the config file parameter again.

Anahtar Kavram

Deployment Manager Preview and Update Lifecycle
Soru 830Soru

An enterprise architecture team is using the Google Cloud Pricing Calculator to estimate monthly infrastructure costs for a telemetry processing system. The workload requires Compute Engine virtual machines to run continuously 24 hours a day, 7 days a week throughout the entire month. The team cannot sign a 1-year or 3-year term commitment, but requires an accurate baseline expense model. Which discount mechanism does the Pricing Calculator automatically apply to the estimated monthly compute cost for these continuously running instances?

Cevabı ve açıklamayı göster

Cevap: Sustained Use Discounts (SUDs)

Cevap

Sustained Use Discounts (SUDs) are automatically included in the Pricing Calculator estimate for continuous Compute Engine VM workloads without requiring a term commitment.
Sustained Use Discounts (SUDs) are automatic discounts provided by Google Cloud for Compute Engine resources (vCPUs and memory) that run for a large portion of the billing month. When specifying 100% monthly utilization in the Google Cloud Pricing Calculator, SUDs are automatically calculated and deducted from the baseline hourly rate without requiring any contractual commitment.

Adım Adım Çözüm

1
Analyze the workload operational requirements
The VM instances run continuously (24/7 for a full month) and cannot use fault-tolerant/preemptible instances.
Uptime and workload stability dictate which discount models are technically viable.
2
Evaluate discount constraints
The scenario specifies that no 1-year or 3-year contractual commitment can be made.
This rules out Committed Use Discounts (CUDs), which mandate 1-year or 3-year commitments.
3
Determine the automatic pricing calculator behavior
Google Cloud automatically applies Sustained Use Discounts (SUDs) for vCPUs and memory when instances run for more than 25% of a month.
The Google Cloud Pricing Calculator automatically factors SUD incremental savings into the net monthly estimate when entering full-month continuous execution hours.

Anahtar Kavram

Sustained Use Discounts in the GCP Pricing Calculator
Soru 831Soru

A DevOps team member needs to link several newly created Google Cloud projects to an existing corporate Billing Account. The team member must be able to associate projects with the billing account, but should not be permitted to modify payment methods, view billing details for unrelated projects, or manage billing account users. Which IAM role should be granted to the team member on the Billing Account to satisfy the principle of least privilege?

Cevabı ve açıklamayı göster

Cevap: Billing Account User (roles/billing.user)

Cevap

Billing Account User (roles/billing.user) is the correct role because it grants permissions to link Google Cloud projects to the billing account without providing administrative or full billing viewing capabilities.
The Billing Account User (roles/billing.user) role provides the exact privilege required to bind projects to a billing account without exposing sensitive financial settings, payment configurations, or permission management capabilities.

Adım Adım Çözüm

1
Identify the required operational task
The user needs to link GCP projects to an existing Billing Account.
Linking a project to a billing account requires specific IAM permissions on both the project and the billing account.
2
Evaluate required billing account permissions
The billing.resourceAssociations.create permission is required on the Billing Account.
Associating resources with a billing account requires resource association privileges.
3
Select the predefined IAM role adhering to least privilege
Billing Account User (roles/billing.user) contains billing.resourceAssociations.create while omitting admin and viewer-broad access.
Using predefined least-privilege roles prevents unauthorized access to payment settings and global billing records.

Anahtar Kavram

Least Privilege IAM Role Assignment for GCP Billing Accounts
Soru 832Soru

A cloud engineer is tasked with establishing a secure, isolated Virtual Private Cloud (VPC) environment in Google Cloud for processing sensitive financial analytics. The solution must completely block general internet egress from internal instances while allowing compute instances without external IP addresses to securely access Cloud Storage using Private Google Access. Administrative SSH management must be strictly restricted to Google Identity-Aware Proxy (IAP).

What is the correct sequential order of operational steps to provision the custom VPC infrastructure, configure regional subnetwork connectivity with Private Google Access, enforce high-priority egress allow rules for restricted Google APIs, implement fallback zero-trust egress blocking, and secure administrative ingress access?

Öğeleri doğru sıraya koymak için sürükleyin

Cevabı ve açıklamayı göster

Cevap

The correct operational sequence begins by creating the custom VPC network (`finance-analytics-vpc`), followed by creating the regional subnet (`finance-subnet-us-east1`) with Private Google Access enabled. Next, the specific high-priority egress allow firewall rule for restricted Google APIs (199.36.153.4/30199.36.153.4/30) with priority 100100 is created. Then, the low-priority fallback egress deny firewall rule (0.0.0.0/00.0.0.0/0) with priority 10001000 is added. Finally, the ingress firewall rule for Identity-Aware Proxy (IAP) SSH access (35.235.240.0/2035.235.240.0/20) on port 2222 is applied.
The correct sequence ensures structural dependencies are satisfied first (VPC network creation, followed by subnetwork provisioning with Private Google Access). Next, egress firewall rules are established following GCP priority evaluation logic: the specific egress ALLOW rule for restricted Google APIs (199.36.153.4/30199.36.153.4/30) uses a lower numerical priority value (100100) so it is evaluated before the general egress DENY rule (0.0.0.0/00.0.0.0/0) which carries a higher numerical priority value (10001000). Finally, the IAP administrative ingress rule is applied to allow remote SSH access to internal instances.

Adım Adım Çözüm

1
Provision custom VPC network baseline
Created `finance-analytics-vpc` using `--subnet-mode=custom`.
VPC networks act as the parent container. Subnets and network-scoped firewall rules cannot be instantiated until the target VPC network resource exists.
2
Provision regional subnetwork with Private Google Access
Subnet `finance-subnet-us-east1` created in `us-east1` with flag `--enable-private-ip-google-access`.
Private Google Access must be enabled at the subnet level to allow internal VMs (which lack public IPv4 addresses) to resolve and route traffic to Google APIs and Cloud Storage.
3
Configure high-priority Google API egress rule
Created egress ALLOW firewall rule with priority 100100 for destination 199.36.153.4/30199.36.153.4/30 on port 443443.
GCP evaluates firewall rules starting from the lowest numerical priority integer. Priority 100100 takes precedence over lower-priority rules such as priority 10001000.
4
Configure catch-all egress block firewall rule
Created egress DENY firewall rule with priority 10001000 targeting destination 0.0.0.0/00.0.0.0/0.
To block standard internet access while permitting Google API access, the broad 0.0.0.0/00.0.0.0/0 deny rule must possess a higher numerical priority value (e.g., 10001000) than the API allow rule (priority 100100).
5
Configure restricted administrative IAP ingress rule
Created ingress ALLOW firewall rule for TCP port 2222 sourced from 35.235.240.0/2035.235.240.0/20 targeting instances tagged `iap-ssh-target`.
Instances without public IP addresses rely on Google IAP CIDR 35.235.240.0/2035.235.240.0/20 for SSH connectivity. Defining this ingress rule secures administrative access after establishing the egress security posture.

Anahtar Kavram

Deployment sequence for custom VPC networks, Private Google Access subnet configuration, and rule priority evaluation order for GCP Firewalls.
Tahmini Süre:3m 0s
Soru 833Soru

A SaaS organization is designing a multi-tier solution on Google Cloud Compute Engine. The public web application requires HTTPS load balancing across multiple regions, acceleration of static website assets, and domain resolution. The internal backend service processes non-HTTP raw TCP streaming data from private VPC resources and requires preservation of client source IP addresses. Which TWO network architecture decisions should you recommend to fulfill these requirements?

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Deploy a Global External Application Load Balancer with Cloud CDN enabled on the backend service for the public web application.; Deploy an Internal Passthrough Network Load Balancer for the internal streaming backend service.

Cevap

The architecture should use a Global External Application Load Balancer with Cloud CDN for the web application and an Internal Passthrough Network Load Balancer for the internal raw TCP streaming service.
For public web traffic needing global HTTPS termination and caching, Global External Application Load Balancers with Cloud CDN are recommended. For internal VPC microservices handling raw TCP protocols that require client IP preservation, Internal Passthrough Network Load Balancers operate at Layer 4 and fulfill all requirements.

Adım Adım Çözüm

1
Analyze frontend requirements for HTTP(S) traffic and static content caching.
Selected Global External Application Load Balancer paired with Cloud CDN.
Cloud CDN integrates with HTTP(S) External Application Load Balancers to cache static content at Google edge points of presence.
2
Analyze backend requirements for internal non-HTTP raw TCP traffic and client IP preservation.
Selected Internal Passthrough Network Load Balancer.
Passthrough load balancers operate at Layer 4 (TCP/UDP), do not proxy connections, and retain original client IP headers.

Anahtar Kavram

Selecting GCP load balancers based on protocol layer (L4 vs L7), traffic scope (internal vs external), and Cloud CDN integration support.
Tahmini Süre:1m 30s
Soru 834Soru

An enterprise operations team is preparing to enable dynamic workload scaling for a microservice deployed on a Google Kubernetes Engine (GKE) cluster. To ensure accurate autoscaling metric calculations and maintain application availability during scaling events, arrange the following CLI management steps in the correct operational sequence from first to last.

Öğeleri doğru sıraya koymak için sürükleyin

Cevabı ve açıklamayı göster

Cevap

The correct operational sequence is: first, set container resource requests using `kubectl set resources`; second, establish a PodDisruptionBudget using `kubectl create poddisruptionbudget`; third, configure the Horizontal Pod Autoscaler using `kubectl autoscale deployment`; fourth, monitor HPA performance using `kubectl get hpa --watch`.
The sequence must start by defining container resource requests via `kubectl set resources` because target utilization percentages in HPA rely on requested CPU/memory values. Next, creating a PodDisruptionBudget ensures availability guards are in place before dynamic scaling occurs. Executing `kubectl autoscale deployment` then creates the HPA controller object. Finally, checking `kubectl get hpa --watch` validates metric ingestion and replica control.

Adım Adım Çözüm

1
Set container resource requests using `kubectl set resources deployment/web-app --requests=cpu=250m,memory=512Mi`.
The Deployment specification includes explicit container resource request baselines.
The Horizontal Pod Autoscaler requires resource requests to calculate CPU and memory utilization percentages.
2
Create a PodDisruptionBudget using `kubectl create poddisruptionbudget`.
The cluster enforces minimum ready replica constraints during voluntary node drains and scaling events.
Protects workload availability before automated replica adjustments begin.
3
Configure autoscaling using `kubectl autoscale deployment web-app --min=3 --max=15 --cpu-percent=80`.
A HorizontalPodAutoscaler resource is created and begins monitoring pod workload metrics.
Initializes the HPA controller to scale deployment replicas dynamically.
4
Observe HPA controller status using `kubectl get hpa web-app --watch`.
Verifies that current metric values are fetched and target replica counts update correctly.
Confirms proper metric pipeline operation and prevents silent scaling failures.

Anahtar Kavram

GKE Workload Resource Allocation and Autoscaling Sequence
Soru 835Soru

Your organization runs an enterprise web application on a Compute Engine Managed Instance Group (MIG) configured with autoscaling. The application requires 4 minutes (240 seconds) after VM boot to download artifacts, initialize local caches, and pass health checks. During sudden load spikes, the autoscaler initiates multiple scale-out events in rapid succession before previously launched instances complete startup, leading to over-provisioning and resource instability. Furthermore, the operations team needs to collect detailed OS-level RAM usage metrics from these VM instances inside Cloud Monitoring. Which set of actions should you take to resolve both issues?

Cevabı ve açıklamayı göster

Cevap: Set the autoscaling policy cool-down period to at least 240 seconds, and install the unified Google Cloud Ops Agent on the VM instances.

Cevap

Configure the autoscaling policy cool-down period to at least 240 seconds (4 minutes) to allow new instances to complete application initialization before further scaling decisions are evaluated, and deploy the Google Cloud Ops Agent to collect guest OS memory metrics.
The correct approach requires setting the MIG autoscaling cool-down period (`--cool-down-period`) to match or exceed the 4-minute application startup duration. This ensures the autoscaler ignores instance metrics until initialization completes. Installing the Google Cloud Ops Agent is the recommended solution to collect OS-level memory metrics, as default Compute Engine metrics only cover hypervisor-visible metrics like CPU and disk I/O.

Adım Adım Çözüm

1
Analyze the autoscaling behavior during instance startup
Identified that the 4-minute application boot time causes the autoscaler to falsely perceive unresolved load capacity, triggering premature scale-out events.
The cool-down period defines how long the autoscaler waits after a new instance is created before observing its metrics for subsequent scaling decisions.
2
Configure the MIG cool-down parameter
Set `--cool-down-period` to 240 seconds (or higher) in the autoscaler settings.
This prevents metric thrashing and unnecessary instance over-provisioning during the 4-minute boot sequence.
3
Address guest OS memory metric telemetry requirements
Install and configure the unified Google Cloud Ops Agent on the base image or startup script.
Hypervisor-level metrics cannot inspect guest OS memory usage; the Google Cloud Ops Agent is the current standard agent required for system memory and disk metrics.

Anahtar Kavram

Compute Engine MIG Autoscaling Cool-down Period and Telemetry Management
Soru 836Soru

A Cloud Engineer is deploying a multi-tier application infrastructure containing Compute Engine instances and a Cloud SQL database into a newly created target project named `prod-data-project` using Google Cloud Deployment Manager. The deployment templates are maintained in a central repository and executed from a centralized CI/CD host project `ops-ci-project`. When executing `gcloud deployment-manager deployments create prod-stack --config=main.yaml --project=prod-data-project`, the deployment fails with an error indicating that the Cloud SQL Admin API (`sqladmin.googleapis.com`) is not enabled. Which action should the engineer take to resolve this issue?

Cevabı ve açıklamayı göster

Cevap: Enable the `sqladmin.googleapis.com` API inside the `prod-data-project` project.

Cevap

Enable the Cloud SQL Admin API (`sqladmin.googleapis.com`) directly in the target project `prod-data-project` where the infrastructure resources are being instantiated.
When deploying infrastructure via Deployment Manager or Terraform across projects, Google Cloud service APIs must be enabled within the target project (`prod-data-project`) where the actual cloud resources (such as Cloud SQL) are created. Enabling the API in the target project grants Deployment Manager permission to manage that specific API's resources.

Adım Adım Çözüm

1
Identify the target project where infrastructure resources are being provisioned by Deployment Manager.
The target project is `prod-data-project` as specified by the `--project` flag.
Google Cloud service APIs manage resources within the boundary of the specific project where those resources live.
2
Enable the required service API (`sqladmin.googleapis.com`) in the target project.
The API is activated for `prod-data-project`.
Deployment Manager API calls on behalf of a deployment fail if the required service API is disabled in the resource target project.
3
Re-run the deployment command `gcloud deployment-manager deployments create prod-stack --config=main.yaml --project=prod-data-project`.
The Deployment Manager service provisions the Cloud SQL database and associated resources successfully.
With the target API enabled, Deployment Manager has authorization to instantiate Cloud SQL resources.

Anahtar Kavram

API Enablement Scoping for Infrastructure as Code
Soru 837Soru

A cloud engineer is deploying a new Cloud SQL for PostgreSQL instance named `analytics-db` for an internal reporting application. The compliance policy requires automated daily backups starting at 02:00 UTC and point-in-time recovery (PITR) enabled. Additionally, to ensure network security for public IP access, the instance must accept incoming connections strictly from an on-premises office CIDR block (`198.51.100.45/32`). Which `gcloud` command should the engineer run to provision this database instance correctly?

Cevabı ve açıklamayı göster

Cevap: gcloud sql instances create analytics-db --database-version=POSTGRES_15 --backup-start-time=02:00 --enable-point-in-time-recovery --authorized-networks=198.51.100.45/32

Cevap

Execute 'gcloud sql instances create analytics-db --database-version=POSTGRES_15 --backup-start-time=02:00 --enable-point-in-time-recovery --authorized-networks=198.51.100.45/32'.
The command 'gcloud sql instances create analytics-db --database-version=POSTGRES_15 --backup-start-time=02:00 --enable-point-in-time-recovery --authorized-networks=198.51.100.45/32' correctly provisions a Cloud SQL PostgreSQL instance, schedules daily automated backups starting at 02:00 UTC, enables PostgreSQL point-in-time recovery (PITR) via Write-Ahead Logs, and restricts incoming public connections exclusively to the specified on-premises CIDR block.

Adım Adım Çözüm

1
Identify the target resource service and CLI group
Use 'gcloud sql instances create' to manage Cloud SQL database instance deployments.
Compute Engine VM commands ('gcloud compute instances') do not provision managed database services.
2
Configure PostgreSQL point-in-time recovery and backup parameters
Include '--enable-point-in-time-recovery' and '--backup-start-time=02:00'.
Cloud SQL for PostgreSQL uses '--enable-point-in-time-recovery' to retain Write-Ahead Logs (WAL) for PITR, whereas '--enable-bin-log' applies only to MySQL.
3
Restrict public network exposure using authorized networks
Set '--authorized-networks=198.51.100.45/32'.
Restricts incoming connections to the specific corporate CIDR block rather than allowing unrestricted public access ('0.0.0.0/0').

Anahtar Kavram

Provisioning Cloud SQL instances with backup windows, PostgreSQL point-in-time recovery, and authorized networks using gcloud CLI.
Soru 838Soru

A cloud engineer needs to add a new dedicated pool of compute nodes to an existing GKE Standard cluster named `app-cluster` in zone `us-central1-a`. The new nodes must use the `e2-highmem-16` machine type to support memory-intensive workloads. Which `gcloud` command should the engineer execute to fulfill this requirement?

Cevabı ve açıklamayı göster

Cevap: gcloud container node-pools create memory-pool --cluster=app-cluster --machine-type=e2-highmem-16 --zone=us-central1-a

Cevap

Execute gcloud container node-pools create memory-pool --cluster=app-cluster --machine-type=e2-highmem-16 --zone=us-central1-a to provision a new node pool with the desired machine type on the existing cluster.
To add a new pool of nodes to an existing GKE Standard cluster with a customized machine type, the command `gcloud container node-pools create` must be used along with specifying the target cluster name, desired machine type, and zone location.

Adım Adım Çözüm

1
Identify the target resource and operation
The requirement is to provision additional infrastructure (a node pool with specialized machine types) on an existing Google Kubernetes Engine cluster.
GCP infrastructure operations require Google Cloud management tools rather than Kubernetes in-cluster API calls.
2
Select the correct gcloud group and subcommand
Use `gcloud container node-pools create` specified with `--cluster`, `--machine-type`, and `--zone` flags.
Creating additional node pools requires the node-pools sub-command group under container.

Anahtar Kavram

GKE Node Pool Provisioning and Management
Soru 839Soru

A cloud engineer is provisioning a production Cloud SQL for PostgreSQL instance named `analytics-db` in the `us-central1` region. The database must be reachable exclusively via Private IP within an existing Virtual Private Cloud network named `corp-vpc`, completely disabling any public IP address exposure. Additionally, the instance must be configured for High Availability (HA) across multiple zones and allow disk storage to automatically scale as data grows. Which `gcloud` command correctly deploys the instance according to these requirements?

Cevabı ve açıklamayı göster

Cevap: gcloud sql instances create analytics-db --database-version=POSTGRES_15 --tier=db-custom-4-15360 --region=us-central1 --network=corp-vpc --no-assign-ip --availability-type=REGIONAL --storage-auto-increase

Cevap

The command including `--network=corp-vpc`, `--no-assign-ip`, `--availability-type=REGIONAL`, and `--storage-auto-increase` is correct.
The correct command combines `--network=corp-vpc` and `--no-assign-ip` to enforce private IP access only while disabling public IP assignment. It also sets `--availability-type=REGIONAL` to enable cross-zone failover (HA) and includes `--storage-auto-increase` to enable dynamic storage capacity expansion.

Adım Adım Çözüm

1
Identify network connectivity flags
Specifying `--network=corp-vpc` enables private IP allocation through Private Services Access. However, Cloud SQL instances assign a public IP address by default unless `--no-assign-ip` is explicitly provided.
Ensures the database instance is isolated to internal VPC traffic and has no public IPv4 address assigned.
2
Identify high availability configuration flag
Setting `--availability-type=REGIONAL` provisions a standby instance in a secondary zone within the region to support automatic failover.
Fulfills the requirement for high availability.
3
Identify storage expansion configuration flag
Including `--storage-auto-increase` enables Cloud SQL to automatically expand storage capacity when remaining space falls below threshold limits.
Prevents database downtime due to disk space exhaustion.

Anahtar Kavram

Cloud SQL Private IP and HA Deployment via gcloud CLI
Soru 840Soru

A cloud engineer is using the Google Cloud Pricing Calculator to model monthly expenses for an application workload deployed on Google Compute Engine across a 30-day month (720 total hours). The workload requires 10 virtual machines (`e2-standard-4`), each priced at an un-discounted base compute rate of 0.10perhour.Thecompanypurchasesa3yearCommittedUseDiscount(CUD)forE2instances,whichprovidesa450.10 per hour. The company purchases a 3-year Committed Use Discount (CUD) for E2 instances, which provides a 45% discount on the compute hourly rate. Each VM also requires a 100 GB Standard Persistent Disk attached, priced at 0.04 per GB per month (storage pricing is not subject to CUDs). What is the total net monthly cost, in USD, for compute and disk storage across all 10 virtual machines combined?

Cevabı ve açıklamayı göster

Cevap: 436

Cevap

The net total monthly cost for compute and disk storage across all 10 virtual machines combined is $436.
The baseline compute cost per VM for 720 hours is 72.00(72.00 ( 0.10 * 720). A 3-year Committed Use Discount reduces compute costs by 45%, bringing the compute cost per VM down to 39.60(39.60 ( 72.00 * 0.55). Each VM's 100 GB persistent disk costs 4.00permonth(1004.00 per month (100 * 0.04) and is not subject to compute CUD discounts. Combining compute (39.60)andstorage(39.60) and storage ( 4.00) yields 43.60perVMpermonth.For10VMs,thetotalnetcostis43.60 per VM per month. For 10 VMs, the total net cost is 43.60 * 10 = $436.00.

Adım Adım Çözüm

1
Calculate the un-discounted baseline compute cost for a single virtual machine running continuously for 720 hours.
72.00perVM(72.00 per VM ( 0.10/hour * 720 hours)
Establishing the baseline monthly compute expense before applying committed use discounts.
2
Apply the 45% Committed Use Discount (CUD) rate to the compute portion of the instance.
39.60perVM(39.60 per VM ( 72.00 * 0.55)
Committed Use Discounts reduce hourly compute rates for committed workloads.
3
Calculate the monthly storage cost for 100 GB of Standard Persistent Disk attached to a single VM.
4.00perVM(100GB4.00 per VM (100 GB * 0.04/GB)
Persistent disk storage is billed separately at a flat monthly rate per GB and is not eligible for Compute Engine CUDs.
4
Sum the net compute cost and storage cost for one VM, then scale by 10 total VMs.
436.00totalmonthlyexpense((436.00 total monthly expense (( 39.60 + $4.00) * 10)
The aggregate workload cost must reflect both discounted compute resources and attached persistent storage for all provisioned instances.

Anahtar Kavram

Estimating Compute Engine infrastructure costs using Committed Use Discounts (CUDs) and correctly differentiating between discount-eligible compute resources and non-eligible persistent disk storage.
ÖncekiSayfa 42 / 80Sonraki
Tüm alıştırma soruları — Google Cloud Associate Cloud Engineer | Examkin