Tüm alıştırma soruları

1591 soru

Soru 1041Soru

A cloud engineer manages a Google Kubernetes Engine (GKE) Standard cluster named `analytics-cluster` in zone `us-central1-a`. Several newly deployed workload Pods are stuck in a `Pending` state because the existing node pool named `analytics-pool` lacks sufficient CPU capacity to schedule them. The engineer needs to ensure that worker node capacity automatically scales out whenever Pods cannot be scheduled due to resource constraints. Which `gcloud` command should the engineer execute?

Cevabı ve açıklamayı göster

Cevap: gcloud container clusters update analytics-cluster --enable-autoscaling --node-pool=analytics-pool --min-nodes=2 --max-nodes=8 --zone=us-central1-a

Cevap

Execute `gcloud container clusters update analytics-cluster --enable-autoscaling --node-pool=analytics-pool --min-nodes=2 --max-nodes=8 --zone=us-central1-a` to enable Cluster Autoscaler on the existing node pool.
The correct command updates the GKE cluster configuration by enabling Cluster Autoscaler specifically for the target node pool (`analytics-pool`) with defined minimum and maximum node limits. When Pods cannot be scheduled due to insufficient CPU, Cluster Autoscaler provisions additional Compute Engine nodes in the pool.

Adım Adım Çözüm

1
Identify the resource bottleneck preventing Pod scheduling
Pods are in a `Pending` state due to insufficient CPU capacity on existing worker nodes.
When nodes run out of schedulable CPU or memory requests, Kubernetes cannot place incoming Pods on current nodes.
2
Select the appropriate scaling component
Choose Cluster Autoscaler rather than Horizontal Pod Autoscaler.
Cluster Autoscaler manages the infrastructure layer (Compute Engine instances in the node pool), whereas HPA manages Pod replica counts.
3
Execute the node pool autoscaling command
Run `gcloud container clusters update` specifying `--enable-autoscaling`, `--node-pool`, `--min-nodes`, and `--max-nodes`.
This enables GKE Cluster Autoscaler to automatically provision additional Compute Engine instances within the specified boundaries when pending Pods are detected.

Anahtar Kavram

GKE Cluster Autoscaler configuration for dynamic node pool scaling
Soru 1042Soru

An enterprise data engineering team processes nightly batch data pipelines that are fault-tolerant and save progress checkpoints to a Cloud Storage bucket every 10 minutes. The engineering manager needs to optimize compute costs for this workload while delegating operational tasks—such as starting, stopping, and reconfiguring these Compute Engine VM instances—to a specialized operations team following Google Cloud security best practices. Which TWO actions should the cloud engineer take to meet these requirements? (Select 2 answers.)

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

Cevabı ve açıklamayı göster

Cevap: Provision Compute Engine virtual machines using the Spot VM provisioning model to run the batch processing tasks.; Grant the operations team the predefined Compute Instance Admin (v1) role (roles/compute.instanceAdmin.v1) on the project.

Cevap

The cloud engineer should provision Compute Engine virtual machines using the Spot VM provisioning model and grant the operations team the predefined Compute Instance Admin (v1) role (roles/compute.instanceAdmin.v1).
Utilizing Spot VMs is Google Cloud's recommended strategy for batch and fault-tolerant workloads that checkpoint progress, yielding maximum cost efficiency. Additionally, delegating VM management via the predefined `roles/compute.instanceAdmin.v1` role adheres strictly to the principle of least privilege while providing all required Compute Engine operational capabilities.

Adım Adım Çözüm

1
Analyze workload fault tolerance and cost requirements
Identified that the batch workload is checkpointed every 10 minutes to Cloud Storage, making it fully resilient to VM preemptions.
Spot VMs provide significant cost reductions (60-91% discount) for fault-tolerant and stateless/checkpointed workloads.
2
Evaluate IAM access management requirements
Determined that the operations team requires start, stop, and reconfiguration capabilities for Compute Engine instances.
The predefined role `roles/compute.instanceAdmin.v1` provides full administrative access over Compute Engine instances without granting project-wide primitive Editor access.
3
Reject non-compliant architectural choices
Eliminated options advocating standard On-Demand instances, primitive Editor roles, and project duplication for quota bypassing.
These alternatives violate cost optimization guidelines, least privilege security practices, and GCP quota management standards.

Anahtar Kavram

Managing Compute Engine resource cost optimization with Spot VMs and securing lifecycle access using IAM predefined roles.
Soru 1043Soru

A security engineer needs to configure access for an application service account running in a dedicated project named `finance-prod-app`. The service account requires access to retrieve and read secret values stored within Secret Manager in this project. To comply with corporate security standards, the service account must not have access to secrets in any other project within the organization, nor should it have permissions to create, update, or delete secret metadata. Which IAM role binding strategy adheres to the principle of least privilege while meeting these requirements?

Cevabı ve açıklamayı göster

Cevap: Grant the Secret Manager Secret Accessor role (roles/secretmanager.secretAccessor) to the service account on the finance-prod-app project.

Cevap

Granting the predefined Secret Manager Secret Accessor role (roles/secretmanager.secretAccessor) at the specific project resource scope (finance-prod-app) adheres strictly to the principle of least privilege.
The predefined role 'roles/secretmanager.secretAccessor' specifically grants the permission 'secretmanager.versions.access' required to read secret payloads. Binding this role at the project level restricts access to secrets within that project alone, fulfilling both operational and security requirements under the principle of least privilege.

Adım Adım Çözüm

1
Identify the specific permission requirements
The workload requires reading secret payload data (secret accessor rights) without modification or administrative permissions.
Understanding exact access requirements prevents over-privileging.
2
Select the appropriate IAM role type
Choose the predefined role 'roles/secretmanager.secretAccessor' over primitive roles like Editor or Viewer.
Predefined roles contain tailored permission sets specific to the required operations.
3
Determine the correct resource hierarchy scope
Bind the role at the target Project level ('finance-prod-app') rather than at the Folder or Organization level.
IAM bindings propagate downward through inheritance; scope must be limited to the lowest level required by the workload.

Anahtar Kavram

Managing IAM Roles and Permissions - Least Privilege Scope and Predefined Roles
Soru 1044Soru

An integration engineer is configuring access for an external application service account that must send telemetry messages to a specific Google Cloud Pub/Sub topic in a production project. The application should only be capable of publishing messages to this single topic and must not be allowed to read messages, manage subscriptions, or modify any other project resources. To adhere to Google Cloud's recommendation of least privilege, which IAM configuration should be implemented?

Cevabı ve açıklamayı göster

Cevap: Grant the Pub/Sub Publisher role (`roles/pubsub.publisher`) to the service account directly on the target Pub/Sub topic resource.

Cevap

Grant the Pub/Sub Publisher role (`roles/pubsub.publisher`) to the service account directly on the target Pub/Sub topic resource.
Granting the Pub/Sub Publisher role (`roles/pubsub.publisher`) directly on the target Pub/Sub topic resource enforces least privilege in two ways: it selects a fine-grained predefined role containing only publish permissions, and it scopes that permission strictly to the designated topic resource.

Adım Adım Çözüm

1
Identify the specific permission required by the workload.
The application only needs `pubsub.topics.publish` to publish telemetry messages.
Least privilege requires matching permissions to the minimum necessary actions.
2
Select the appropriate predefined role over broad primitive or administrative roles.
`roles/pubsub.publisher` provides the publishing permission without granting topic creation, subscription management, or message consumption rights.
Predefined roles provide fine-grained permissions tailored to specific tasks.
3
Determine the narrowest resource scope for the role binding.
Apply the role binding on the specific topic resource rather than at the project level.
Binding roles at lower resource levels prevents granting access to other topics within the same project.

Anahtar Kavram

Applying fine-grained predefined IAM roles at the resource level to enforce least privilege.
Tahmini Süre:1m 30s
Soru 1045Soru

A DevOps team is deploying an event-driven Python microservice as a Cloud Functions (2nd gen) service to process file uploads arriving in a Cloud Storage bucket. The microservice must execute using a dedicated custom service account under the principle of least privilege while interacting with Cloud Storage and Firestore. Which TWO actions must the team perform to successfully deploy and configure this serverless workload?

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

Cevabı ve açıklamayı göster

Cevap: Pass the custom service account email address using the `--service-account` flag when executing the `gcloud functions deploy` command.; Grant the `roles/eventarc.eventReceiver` IAM role to the runtime service account to allow it to receive trigger events.

Cevap

The team must pass the custom service account email via the `--service-account` flag during deployment and grant the `roles/eventarc.eventReceiver` IAM role to the runtime service account.
Deploying a 2nd gen Cloud Function with Cloud Storage triggers requires specifying the custom service account via `--service-account` during `gcloud functions deploy` and granting `roles/eventarc.eventReceiver` to that service account so it can receive incoming trigger events.

Adım Adım Çözüm

1
Configure the runtime service account identity for the function.
Using the `--service-account` flag during `gcloud functions deploy` ensures the function executes with the specific custom identity instead of the default service account.
This enforces least privilege by granting only necessary predefined roles to Cloud Storage and Firestore.
2
Configure Eventarc trigger permissions for 2nd gen Cloud Functions.
Granting `roles/eventarc.eventReceiver` to the runtime service account allows it to receive Storage events routed via Eventarc.
2nd gen Cloud Functions rely on Eventarc infrastructure to deliver Cloud Storage event notifications.

Anahtar Kavram

Deploying 2nd gen Cloud Functions with custom service accounts and Eventarc triggers
Soru 1046Soru

Your organization operates a multi-tier enterprise workload in Google Cloud using a custom Virtual Private Cloud (VPC) named `prod-vpc`. An existing ingress firewall rule named `allow-app-traffic` currently allows inbound TCP traffic on port 8080 from `10.2.0.0/16` to instances tagged `app-server`, evaluated at a priority of 1000. Due to a compliance update, you must modify this rule to meet three operational requirements:
1. Restrict the source IP range to `10.2.15.0/24`.
2. Ensure the firewall rule takes precedence over a newly added conflicting rule evaluated at priority 500.
3. Keep the target tag `app-server` intact while replacing the source range.

Which `gcloud` command should you execute to accomplish this operational requirement cleanly in a single step?

Cevabı ve açıklamayı göster

Cevap: gcloud compute firewall-rules update allow-app-traffic --source-ranges=10.2.15.0/24 --priority=200

Cevap

Execute 'gcloud compute firewall-rules update allow-app-traffic --source-ranges=10.2.15.0/24 --priority=200' to update the source range and assign a lower numeric priority value for higher evaluation precedence.
In Google Cloud VPC firewall rule evaluation, rules are processed in order of priority from lowest integer value to highest integer value. A priority of 200 is evaluated before priority 500, giving it higher precedence. Additionally, using 'gcloud compute firewall-rules update' with '--source-ranges=10.2.15.0/24' replaces the existing CIDR block while leaving unspecified fields like target tags unchanged.

Adım Adım Çözüm

1
Analyze GCP firewall priority ordering rules
GCP evaluates firewall rules starting from the lowest numeric priority value (0) up to the highest (65535).
To override a rule evaluated at priority 500, the updated rule must be assigned a priority strictly less than 500, such as 200.
2
Determine the proper gcloud CLI command and flag syntax for updating firewall rules
The command 'gcloud compute firewall-rules update' modifies existing rules in place.
Passing '--source-ranges=10.2.15.0/24' overwrites the previous source range while preserving existing attributes not explicitly modified, such as target tags.
3
Synthesize parameters into a valid gcloud command execution
The final command specifies both '--source-ranges=10.2.15.0/24' and '--priority=200'.
This updates the rule in a single atomic administrative action without syntax errors or creating duplicate rules.

Anahtar Kavram

VPC Firewall Rule Priority and Modification Syntax
Soru 1047Soru

A Cloud Engineer needs to migrate an existing local Terraform state file to a Google Cloud Storage (GCS) remote backend to allow team collaboration and state locking. What is the correct sequence of steps to safely execute this backend migration?

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

Cevabı ve açıklamayı göster

Cevap

The correct sequence starts with creating the GCS storage bucket, adding the backend block to the HCL configuration, running terraform init, and confirming the state migration prompt.
To migrate state securely to GCS, the target GCS bucket must first exist. Next, the backend "gcs" configuration block is defined in HCL code. Running `terraform init` detects the new backend configuration and initiates the migration. Finally, confirming the migration prompt copies the existing local state file to the remote GCS bucket.

Adım Adım Çözüm

1
Provision the GCS bucket
A destination storage location is ready to accept the Terraform state file.
Terraform cannot automatically create the GCS bucket specified in its backend block during initialization.
2
Configure the GCS backend in HCL
The Terraform code defines the remote backend location.
Terraform needs the backend provider block configured in code before it can change state storage locations.
3
Execute terraform init
Terraform detects the backend change from local to GCS.
The init command reconfigures working directory backends and initiates the state copy workflow.
4
Approve the state migration prompt
Local state is uploaded to the GCS bucket and local state file is updated.
Terraform asks for explicit user confirmation before transferring existing local state to remote storage.

Anahtar Kavram

Migrating Terraform Local State to GCS Remote Backend
Tahmini Süre:1m 0s
Soru 1048Soru

An online retail organization is migrating its platform backend to Google Cloud. The architecture requires two storage components: first, a transactional relational database for order management that mandates ACID compliance and automatic cross-zone failover within a single region; second, ultra-low sub-millisecond latency scratch storage for ephemeral data processing jobs running on Compute Engine instances. Which TWO storage and database configurations should the team select to satisfy these requirements?

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

Cevabı ve açıklamayı göster

Cevap: Cloud SQL configured with High Availability (regional failover) for the order management database; Local SSD attached to Compute Engine instances for high-performance temporary scratch storage

Cevap

The team should select Cloud SQL configured with High Availability for the transactional relational order management database, and Local SSD attached to Compute Engine instances for low-latency temporary scratch storage.
Cloud SQL with High Availability (HA) provides managed relational engines with ACID compliance and automatic failover between primary and standby zones in a region. Local SSDs are physically attached to the server hosting the Compute Engine VM, offering high throughput and sub-millisecond latency required for temporary scratch processing.

Adım Adım Çözüm

1
Analyze the relational transactional database requirements
Identify that Cloud SQL provides managed SQL engines (MySQL, PostgreSQL, SQL Server) with ACID compliance, and configuring High Availability adds automatic cross-zone failover within a region.
Relational transactional workloads requiring ACID compliance and regional redundancy align directly with Cloud SQL HA.
2
Analyze the high-performance scratch storage requirements
Identify Local SSD as host-attached ephemeral block storage providing maximum IOPS and sub-millisecond latency.
Temporary/scratch workloads requiring sub-millisecond response times are best served by host-attached Local SSD.
3
Evaluate wrong options against constraints
Cloud Bigtable lacks relational multi-table ACID transactions, and Coldline Cloud Storage carries high retrieval fees and higher latency meant for archival data.
Selecting NoSQL for relational SQL needs or cold object storage for active scratch space violates GCP architectural best practices.

Anahtar Kavram

Matching GCP relational databases (Cloud SQL HA) and block storage types (Local SSD) to specific operational and performance requirements
Soru 1049Soru

A Systems Administrator needs to create a standardized golden image from an existing, configured Compute Engine instance named `web-template-vm` located in GCP project `corp-base-images`. The administrator must then use this custom image to provision a new production Compute Engine instance in a separate project named `corp-prod-apps`. In what correct chronological order should the administrator perform the steps to complete this cross-project image creation and VM deployment workflow?

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

Cevabı ve açıklamayı göster

Cevap

The correct sequence is: First, stop the reference Compute Engine instance to ensure disk consistency. Second, create the custom image from the boot disk. Third, grant the Compute Image User role on the image/project to the target project's identity. Fourth, execute the gcloud instance creation command in the target project referencing the image and image-project flags.
To deploy a Compute Engine VM from a custom image in a separate project, the source instance must first be stopped to guarantee disk state consistency. Next, the custom image is created from the source boot disk. Then, cross-project access must be configured by granting the Compute Image User role (roles/compute.imageUser) to the deploying identity or service account in the target project. Finally, the VM can be provisioned in the target project using the gcloud command with --image and --image-project specified.

Adım Adım Çözüm

1
Prepare source disk state
Reference VM instance is powered off safely.
Creating an image from a running VM can lead to inconsistent state or file corruption.
2
Generate custom image resource
Custom image object created in the base images project.
The custom image bundles the OS, configuration, and software stack required for deployment.
3
Configure cross-project IAM permissions
Target project service account is authorized to consume the image.
Compute Engine denies image access across projects by default unless roles/compute.imageUser is granted.
4
Deploy new VM instance
New VM is provisioned in target project using the cross-project custom image.
Passing --image and --image-project parameters instructs Compute Engine to fetch the boot disk image from the central project.

Anahtar Kavram

Cross-Project Custom Image Creation and VM Provisioning
Soru 1050Soru

A DevOps engineer needs to grant a CI/CD service account permission to push container images to a single specific Artifact Registry repository within the project `prod-apps-123`. Following the principle of least privilege, the service account must be allowed to write artifacts to this repository without permissions to delete artifacts, alter repository administrative settings, or gain access to other repositories in the organization hierarchy. Which IAM configuration should the engineer apply?

Cevabı ve açıklamayı göster

Cevap: Assign the Artifact Registry Writer (`roles/artifactregistry.writer`) role to the service account bound directly to the target Artifact Registry repository resource.

Cevap

Assign the Artifact Registry Writer role (`roles/artifactregistry.writer`) directly on the specific Artifact Registry repository resource.
Assigning the predefined Artifact Registry Writer role (`roles/artifactregistry.writer`) directly on the specific Artifact Registry repository satisfies the exact functional requirements while enforcing both least role privilege and narrowest resource scope.

Adım Adım Çözüm

1
Identify the required permissions needed for pushing container images.
The predefined role Artifact Registry Writer (`roles/artifactregistry.writer`) provides read and write permissions for artifacts without delete or repository admin permissions.
Selecting a predefined role over a broad primitive role enforces least privilege functionality.
2
Determine the narrowest resource scope for the binding.
Binding the role at the specific repository resource level limits permissions strictly to that single repository.
IAM roles configured higher in the hierarchy (project, folder, or organization) inherit down to all child resources, violating least privilege.

Anahtar Kavram

Applying least privilege by combining predefined roles with precise resource-level IAM bindings.
Soru 1051Soru

An enterprise network team is provisioning infrastructure within a custom-mode Virtual Private Cloud (VPC) named `corp-vpc` that connects to an on-premises network operating on 10.100.0.0/1610.100.0.0/16. The requirement is to deploy a new subnet `us-east-subnet` in region `us-east1` and configure firewall rules allowing inbound SSH traffic from the on-premises range exclusively to instances tagged with `secure-bastion`. This inbound SSH rule must override a broad network-wide SSH block rule currently set with a priority of 1000.

Which TWO configuration choices or CLI operations are correct to implement this requirement? (Select TWO)

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

Cevabı ve açıklamayı göster

Cevap: Execute `gcloud compute networks subnets create us-east-subnet --network=corp-vpc --region=us-east1 --range=10.1.0.0/24` to provision the regional custom subnet.; Assign a numerical priority value less than 1000 (such as 500) to the targeted SSH allow firewall rule.

Cevap

To successfully deploy the hybrid subnet and ensure the custom ingress rule takes effect, create the subnet with a non-overlapping CIDR range (10.1.0.0/2410.1.0.0/24) and configure the targeted SSH allow firewall rule with a priority value lower than 1000 (e.g., 500).
Google Cloud VPC firewall rule evaluation follows strict numerical ordering from 0 (highest precedence) to 65535 (lowest precedence). Therefore, setting a priority number less than 1000 ensures the targeted SSH allow rule is applied before the network-wide deny rule. Additionally, subnets created in custom VPC networks must use CIDR ranges that do not overlap with existing connected infrastructure such as on-premises networks.

Adım Adım Çözüm

1
Select a non-overlapping IP address range for the new custom subnet.
Using range 10.1.0.0/2410.1.0.0/24 avoids CIDR collision with the on-premises 10.100.0.0/1610.100.0.0/16 space, enabling proper routing across hybrid connections.
VPC subnet ranges cannot overlap with peered or hybrid network ranges.
2
Provision the custom subnet using gcloud CLI.
The command specifying `--network=corp-vpc`, `--region=us-east1`, and `--range=10.1.0.0/24` successfully creates `us-east-subnet`.
Custom-mode VPC networks require explicit subnet creation with defined regional CIDR parameters.
3
Determine the correct priority value for the firewall rule override.
Selecting a priority value of 500 ensures evaluation ahead of the rule with priority 1000.
GCP evaluates firewall rules sequentially starting from priority 0 up to 65535; lower numbers have higher precedence.

Anahtar Kavram

VPC Firewall Priority Precedence and Hybrid Subnet CIDR Planning
Soru 1052Soru

An enterprise financial organization is architecting a Google Kubernetes Engine (GKE) cluster to support a mission-critical transaction processing system. The architecture must ensure high availability for both the cluster control plane and worker nodes during a single availability zone outage, while avoiding control plane downtime during master upgrades. Additionally, the workload cannot tolerate unexpected node preemptions. Which cluster configuration should the cloud engineer choose to satisfy these constraints?

Cevabı ve açıklamayı göster

Cevap: Provision a Regional GKE cluster distributed across multiple availability zones using standard persistent node pools.

Cevap

Provision a Regional GKE cluster distributed across multiple availability zones using standard persistent node pools.
Regional GKE clusters replicate the control plane across three availability zones within the chosen region and spread node pools across those zones. This guarantees high availability during zone outages and allows master upgrades without control plane downtime. Using standard (non-Spot) nodes ensures worker instances are not unexpectedly preempted.

Adım Adım Çözüm

1
Evaluate control plane availability requirements
Zonal GKE clusters deploy a single master node in one zone, whereas Regional clusters deploy three master instances across three zones.
High availability for control plane upgrades and zone outages requires a Regional cluster architecture.
2
Evaluate workload fault tolerance against VM preemption
Spot VMs can be reclaimed by Google Compute Engine at any time with a 30-second notice.
Mission-critical transaction processing cannot tolerate unexpected node preemption, ruling out Spot VM node pools.
3
Select the GKE cluster topology that fulfills all requirements
A Regional GKE cluster with standard (non-preemptible) worker nodes distributed across multiple zones fulfills both high availability and persistent node requirements.
This configuration balances control plane resilience and worker node stability.

Anahtar Kavram

GKE Regional vs. Zonal Cluster Architecture and Spot VM Suitability
Soru 1053Soru

An e-commerce company is architecting a containerized application platform on Google Kubernetes Engine (GKE). The solution consists of two distinct workloads: a stateless, fault-tolerant log analytics pipeline and a legacy core service that requires custom Linux kernel sysctl parameters and specialized node-level privilege access to the host OS. Which TWO architectural decisions should the engineering team implement to satisfy these operational and technical requirements? (Select TWO options.)

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

Cevabı ve açıklamayı göster

Cevap: Provision a dedicated GKE Standard node pool configured with Spot VMs to execute the fault-tolerant log analytics workload at reduced cost.; Deploy the legacy core service on a GKE Standard cluster to support custom kernel sysctl parameters and host node operating system access.

Cevap

The correct architecture requires provisioning a GKE Standard node pool using Spot VMs for stateless, fault-tolerant workloads to save costs, and deploying workloads requiring custom Linux kernel sysctl parameters or direct host OS access onto GKE Standard mode.
Deploying on GKE Standard is necessary whenever custom Linux kernel parameters or privileged host OS access is required. Additionally, using Spot VM node pools for stateless log analytics provides significant cost reduction while satisfying the fault-tolerant nature of the processing pipeline.

Adım Adım Çözüm

1
Analyze workload requirements for node OS customizations and host access.
GKE Autopilot locks down node configuration for security and operational ease. Therefore, custom sysctl settings and host OS access necessitate GKE Standard mode.
GKE Standard retains cluster node admin control required for OS-level tuning.
2
Analyze cost optimization for the fault-tolerant, stateless log analytics pipeline.
Spot VMs provide significant cost discounts for workloads that can handle sudden node termination.
Stateless log analytics workloads can tolerate preemptions without data corruption.

Anahtar Kavram

Selecting between GKE Autopilot vs. Standard modes and identifying appropriate use cases for Spot VM node pools.
Tahmini Süre:2m 0s
Soru 1054Soru

A cloud engineer needs to deploy a Cloud SQL for PostgreSQL instance named analytics-db in the us-central1 region using the gcloud CLI. The deployment must strictly enforce private IP connectivity on the custom VPC network prod-vpc without allocating a public IP address, and must ensure high availability across multiple zones. Which TWO flags must be included in the gcloud sql instances create command to meet these requirements? (Select TWO.)

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

Cevabı ve açıklamayı göster

Cevap: --network=prod-vpc and --no-assign-ip; --availability-type=REGIONAL

Cevap

The correct options are specifying '--network=prod-vpc and --no-assign-ip' to enforce private IP connectivity without a public IP, and '--availability-type=REGIONAL' to configure high availability.
Combining '--network=prod-vpc and --no-assign-ip' ensures that the Cloud SQL instance is accessible exclusively via private IP within the designated VPC network without exposing a public IP address. Adding '--availability-type=REGIONAL' provisions failover infrastructure across multiple zones for high availability.

Adım Adım Çözüm

1
Determine private IP configuration flags for Cloud SQL CLI deployment.
Using --network=prod-vpc routes database connections through Private Service Access, and --no-assign-ip explicitly disables public IP allocation.
Cloud SQL instance creation creates a public IP by default unless --no-assign-ip is provided alongside the target VPC network.
2
Determine high availability deployment configuration flags.
Setting --availability-type=REGIONAL configures primary and standby database instances across distinct zones within the specified region.
A REGIONAL configuration provides automatic synchronous replication and high availability failover capabilities.

Anahtar Kavram

Deploying Cloud SQL with Private IP and High Availability
Soru 1055Soru

An enterprise organization manages a Google Cloud resource hierarchy containing a Folder named 'Data-Analytics' with two child projects: 'analytics-prod' and 'analytics-dev'. A compliance audit team requires permissions to run SQL queries and inspect table data strictly in the 'analytics-prod' project. Additionally, the auditors require read-only visibility into Cloud Storage bucket metadata across both projects. Security policy strictly forbids binding IAM roles at the Folder level to prevent unintended inherited access. Which IAM role assignment configuration adheres to the principle of least privilege while complying with the resource hierarchy constraint?

Cevabı ve açıklamayı göster

Cevap: Grant the BigQuery Job User (roles/bigquery.jobUser) and BigQuery Data Viewer (roles/bigquery.dataViewer) roles on 'analytics-prod', and grant the Storage Object Viewer (roles/storage.objectViewer) role on both 'analytics-prod' and 'analytics-dev' individually.

Cevap

Grant the BigQuery Job User (roles/bigquery.jobUser) and BigQuery Data Viewer (roles/bigquery.dataViewer) roles on 'analytics-prod', and grant the Storage Object Viewer (roles/storage.objectViewer) role on both 'analytics-prod' and 'analytics-dev' individually.
The correct option applies fine-grained predefined IAM roles (BigQuery Job User, BigQuery Data Viewer, and Storage Object Viewer) at the specific project level scope requested. This fulfills all operational requirements while honoring the restriction against folder-level IAM bindings and avoiding over-privileged primitive roles.

Adım Adım Çözüm

1
Analyze resource hierarchy constraints
Identify that role bindings must be made at the project level ('analytics-prod' and 'analytics-dev') rather than the folder level ('Data-Analytics') to prevent permission inheritance.
Organization security rules restrict inherited bindings across folders.
2
Identify BigQuery least-privilege roles for 'analytics-prod'
Select BigQuery Job User (roles/bigquery.jobUser) to allow query execution and BigQuery Data Viewer (roles/bigquery.dataViewer) to view dataset table data.
These predefined roles provide exact capabilities without administrative privileges like BigQuery Admin or broad access like Editor.
3
Identify Cloud Storage least-privilege roles across both projects
Select Storage Object Viewer (roles/storage.objectViewer) applied to 'analytics-prod' and 'analytics-dev' project resources.
This predefined role allows inspecting bucket objects and metadata without granting project-wide read access via the primitive Viewer role.

Anahtar Kavram

Applying Predefined IAM Roles at Project Level vs Folder Inheritance and Primitive Roles
Soru 1056Soru

A network administrator configures two ingress firewall rules for a Google Cloud Virtual Private Cloud (VPC) network targeting the same Compute Engine instance. The first rule, named allow-web, allows TCP traffic on port 80 with a priority of 1000. The second rule, named deny-web, denies TCP traffic on port 80 with a priority of 500. When TCP traffic on port 80 arrives at the instance, which firewall rule determines how the traffic is handled?

Cevabı ve açıklamayı göster

Cevap: The deny-web rule, because lower numerical values specify higher evaluation priority in Google Cloud firewall rules.

Cevap

The deny-web rule determines how traffic is handled because lower numerical values specify higher evaluation priority in Google Cloud VPC firewall rules.
The correct response explains that the deny-web rule takes effect because in Google Cloud VPC firewall rules, lower priority numbers have higher precedence (priority 0 to 65535, where 0 is highest). Priority 500 is evaluated before priority 1000.

Adım Adım Çözüm

1
Identify the numerical priorities of the matching firewall rules.
The rule allow-web has a priority of 1000, while deny-web has a priority of 500.
Firewall evaluation in GCP depends strictly on numerical priority ranking.
2
Apply Google Cloud firewall rule priority logic.
In GCP, lower priority numbers take precedence over higher priority numbers (0 is the highest priority, 65535 is the lowest).
Priority 500 is evaluated before priority 1000.
3
Determine the winning action.
Because deny-web (priority 500) is evaluated first and matches the incoming traffic, the packet is denied immediately.
Evaluation stops at the first matching rule in the priority order.

Anahtar Kavram

Google Cloud VPC Firewall Rule Priority Ordering
Soru 1057Soru

A cloud operations engineer manages a Google Cloud Storage bucket storing high-volume security telemetry logs. The operational requirements dictate that logs must be accessed frequently during the first 30 days for real-time security analysis, accessed rarely over the subsequent 60 days for periodic auditing, and archived long-term for 3 years before deletion. The engineer must automate this workflow to minimize storage and access costs without incurring early retrieval fees during the analysis window. Which Object Lifecycle Management policy configuration should the engineer apply to the bucket?

Cevabı ve açıklamayı göster

Cevap: Keep newly uploaded log objects in Standard storage, add a lifecycle rule to transition objects to Nearline storage after 30 days, add a rule to transition to Coldline storage after 90 days, and add a rule to delete objects after 1095 days.

Cevap

Keep newly uploaded log objects in Standard storage, add a lifecycle rule to transition objects to Nearline storage after 30 days, add a rule to transition to Coldline storage after 90 days, and add a rule to delete objects after 1095 days.
The correct option keeps log files in Standard storage during the initial 30-day security analysis window to prevent high retrieval fees. It configures Object Lifecycle Management rules to transition objects to Nearline storage after 30 days, to Coldline storage after 90 days (covering the 60-day audit window), and deletes them after 1095 days.

Adım Adım Çözüm

1
Analyze access frequency and data lifecycle requirements.
Days 1–30 require frequent access (Standard storage prevents retrieval costs). Days 31–90 require occasional auditing (Nearline storage). Days 91–1095 require long-term retention (Coldline storage). Day 1095 requires deletion.
Matching Cloud Storage classes to access patterns minimizes total operational cost while preventing early retrieval fee penalties.
2
Formulate Google Cloud Storage Object Lifecycle Management rules.
Rule 1: Set Storage Class to Nearline at age 30. Rule 2: Set Storage Class to Coldline at age 90 (30 + 60 days). Rule 3: Delete Object at age 1095 (3 years).
Object Lifecycle Management automates transitions seamlessly without modifying application code.

Anahtar Kavram

Cloud Storage Object Lifecycle Management and Storage Class Cost Optimization
Soru 1058Soru

A Cloud Engineer needs to create a project-level custom IAM role from a definition file (`custom-role.yaml`) and assign it to a service account (`[email protected]`) in the project `my-project`. Place the required command line operations and configuration steps in the correct chronological order from first to last to enforce least privilege access securely.

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

Cevabı ve açıklamayı göster

Cevap

The correct sequence starts by authoring the `custom-role.yaml` permissions file, followed by creating the custom role in the project with `gcloud iam roles create`, binding the custom role to the service account using `gcloud projects add-iam-policy-binding`, and finally verifying the policy update with `gcloud projects get-iam-policy`.
Creating and granting custom IAM permissions in Google Cloud requires defining the role specification file first, creating the role in the project hierarchy, attaching the role binding to the service account member, and finally auditing the updated IAM policy.

Adım Adım Çözüm

1
Define the role manifest (`custom-role.yaml`) with necessary permissions such as `storage.objects.get`.
Local YAML file ready for gcloud role creation input.
gcloud requires a valid configuration manifest or parameter list to establish custom role definitions.
2
Execute `gcloud iam roles create` targeting the specific project with `--file=custom-role.yaml`.
The custom IAM role is created under `projects/my-project/roles/CustomRoleID`.
The role must exist before IAM policy bindings can reference its full resource name.
3
Execute `gcloud projects add-iam-policy-binding` with the `--member` and `--role` flags.
The principal is granted access permissions defined in the custom role.
Assigning roles to principals at the resource level establishes access control rules.
4
Execute `gcloud projects get-iam-policy` to inspect current project permissions.
Confirmation that the service account member is bound to the new role.
Auditing and verifying IAM bindings ensures compliance and confirms least privilege implementation.

Anahtar Kavram

Managing IAM Roles and Resource Access Permissions
Soru 1059Soru

An operations team needs to grant a application service account permissions to publish messages to Cloud Pub/Sub topics and manage Pub/Sub subscriptions within a dedicated staging project. The service account must not be granted full administrative control over Pub/Sub resources, nor broad access across the entire organization. Which TWO IAM roles should you grant to the service account to adhere to the principle of least privilege?

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

Cevabı ve açıklamayı göster

Cevap: Pub/Sub Publisher (roles/pubsub.publisher) on the staging project; Pub/Sub Subscriber (roles/pubsub.subscriber) on the staging project

Cevap

To follow least privilege for messaging and subscription operations within a specific project, grant the Pub/Sub Publisher and Pub/Sub Subscriber predefined roles at the project level.
Combining the Pub/Sub Publisher and Pub/Sub Subscriber roles at the project level provides the exact permissions necessary to publish messages and create/manage subscriptions without granting unnecessary administrative permissions or broad project-wide access.

Adım Adım Çözüm

1
Identify the minimal required permissions for the workload
The workload needs permissions to publish messages and manage subscriptions.
Least privilege mandates giving only necessary permissions for required tasks.
2
Select predefined roles over primitive roles or elevated administrative roles
Choose roles/pubsub.publisher and roles/pubsub.subscriber instead of roles/editor or roles/pubsub.admin.
Predefined roles limit actions specifically to publishing and subscription operations without allowing structural resource modification or broad project edits.
3
Scope the role bindings to the specific target resource level
Apply the bindings at the staging project level rather than the Organization level.
Bindings assigned at higher hierarchy levels inherit down to all child projects, granting excess access.

Anahtar Kavram

Applying Predefined IAM Roles at the Project Level under Least Privilege
Soru 1060Soru

An organization is deploying an internal backend authentication microservice on Compute Engine instances distributed across multiple zones within a single Google Cloud VPC region. The microservice processes raw, non-HTTP TCP traffic on custom port 9090 from client application VMs located inside the same VPC network. The solution must provide internal load balancing with continuous health checks and allow client VMs to access the microservice using a custom internal domain name (auth.internal.example.com). Which TWO architectural actions should you take to meet these requirements?

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

Cevabı ve açıklamayı göster

Cevap: Deploy an Internal Passthrough Network Load Balancer with an internal IP frontend to distribute raw TCP port 9090 traffic across the Compute Engine backend instances.; Create a Cloud DNS Private Managed Zone bound to the VPC network that maps auth.internal.example.com to the internal IP of the load balancer.

Cevap

The correct architecture requires deploying an Internal Passthrough Network Load Balancer to route raw TCP port 9090 traffic inside the VPC, and configuring a Cloud DNS Private Managed Zone bound to the VPC network to resolve the internal FQDN to the load balancer's private IP address.
Deploying an Internal Passthrough Network Load Balancer provides regional Layer 4 load balancing for raw non-HTTP TCP traffic on custom ports within a private VPC network. Pairing this with a Cloud DNS Private Managed Zone linked to the VPC enables client instances to securely resolve internal domain names to the load balancer's private frontend IP address.

Adım Adım Çözüm

1
Evaluate load balancing requirements based on protocol and network scope.
Identified that the microservice uses raw non-HTTP TCP traffic on port 9090 and serves internal VPC clients only.
Layer 4 Internal Passthrough Network Load Balancing is required because Layer 7 proxies (Application Load Balancers) do not support arbitrary non-HTTP TCP protocols.
2
Evaluate DNS resolution requirements for internal VPC hosts.
Identified that client VMs within the VPC need to resolve an internal domain name (auth.internal.example.com) to a private IP address.
Cloud DNS Private Managed Zones provide internal name resolution restricted to authorized VPC networks without public exposure.

Anahtar Kavram

Selecting appropriate GCP load balancers for Layer 4 non-HTTP VPC traffic and configuring Cloud DNS Private Managed Zones for internal name resolution.
Tahmini Süre:1m 30s
ÖncekiSayfa 53 / 80Sonraki
Tüm alıştırma soruları — Google Cloud Associate Cloud Engineer | Examkin