
















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















































Question 1. Which GCP resource hierarchy level is directly above projects and can be used to group projects by department? A) Organization B) Folder C) VPC Network D) Billing Account Answer: B Explanation: Folders sit between the Organization and Projects, allowing grouping of projects by business units or departments. Question 2. In IAM, which role type provides the most granular permission control? A) Primitive role B) Predefined role C) Custom role D) Service account role Answer: C Explanation: Custom roles let you define an exact set of permissions, granting finer granularity than primitive or predefined roles. Question 3. When using Terraform to manage GCP resources, which file typically contains provider configuration? A) main.tf B) variables.tf C) outputs.tf D) terraform.tfvars Answer: A
Explanation: The provider block, specifying the GCP provider and credentials, is usually placed in the main.tf file. Question 4. Which GCP service helps enforce policy that all Compute Engine instances must have a specific label? A) Cloud Asset Inventory B) Organization Policy Service C) Cloud Scheduler D) Cloud Functions Answer: B Explanation: Organization Policy can enforce constraints such as required labels on resources across the organization. Question 5. What is the primary purpose of Cloud Identity in a GCP environment? A) Manage virtual machines B) Provide single sign-on and directory services C) Store container images D) Monitor network latency Answer: B Explanation: Cloud Identity offers identity and access management, enabling SSO and directory synchronization without a full Google Workspace license. Question 6. Which method best synchronizes on-premises Active Directory users with Cloud Identity? A) LDAP over SSL B) Cloud Identity-Aware Proxy C) Google Cloud Directory Sync (GCDS)
B) Support for multiple artifact types (Docker, Maven, npm) C) Automatic vulnerability scanning for all images D) Built-in CI/CD orchestration Answer: B Explanation: Artifact Registry supports Docker images as well as language-specific packages like Maven and npm, unlike Container Registry which only stores Docker images. Question 10. Which deployment strategy gradually routes a small percentage of traffic to a new version while monitoring errors? A) Blue-Green B) Canary C) Rolling Update D) Recreate Answer: B Explanation: Canary deployments expose a subset of users to the new version, allowing validation before full rollout. Question 11. In a blue-green deployment on GKE, how is traffic switched from old to new service without downtime? A) Updating the Deployment selector label B) Changing the Service’s targetPort C) Modifying the Service’s selector to point to the new Pods D) Deleting the old Pods manually Answer: C Explanation: By updating the Service selector to match the new Pods, traffic is rerouted instantly while the old Pods remain running.
Question 12. Which GCP feature enforces that only container images signed with a trusted key can be deployed to GKE? A) Binary Authorization B) Secret Manager C) Cloud Armor D) Forseti Security Answer: A Explanation: Binary Authorization validates image signatures against trusted authorities before allowing deployment to GKE. Question 13. Where should you store database passwords that need to be accessed by Cloud Build steps? A) Compute Engine metadata B) Secret Manager C) Cloud Storage bucket D) Environment variables in cloudbuild.yaml Answer: B Explanation: Secret Manager provides secure storage and controlled access to secrets, making it the appropriate place for passwords. Question 14. Which SLI is most appropriate for measuring API latency? A) Error rate B) Availability percentage C) 99th-percentile response time D) CPU utilization Answer: C Explanation: Latency is typically measured using percentile response times (e.g., 99th percentile) to capture tail latency.
Question 18. In incident management, what is the purpose of a blameless postmortem? A) Assign blame to the responsible team B) Identify root cause without focusing on individuals C) Document legal liabilities D) Penalize developers for errors Answer: B Explanation: Blameless postmortems aim to understand systemic failures and improve processes, not to assign personal blame. Question 19. Which tool can be used to perform chaos engineering experiments on GKE clusters? A) Cloud Scheduler B) Chaos Monkey for GKE (implemented via Cloud Functions) C) Cloud Armor D) Cloud CDN Answer: B Explanation: Chaos Monkey (or similar custom scripts) can be deployed as Cloud Functions to intentionally kill Pods, testing resilience. Question 20. Which Monitoring Query Language (MQL) function is used to calculate a rolling 5-minute average of CPU usage? A) rate() B) align_mean(5m) C) aggregate(mean, 5m) D) moving_average(5m) Answer: B
Explanation: align_mean(5m) aligns data points into 5-minute windows and computes the mean for each window. Question 21. To export all VPC Flow Logs to BigQuery for long-term analysis, which Cloud Logging component must you configure? A) Log Bucket B) Log Sink C) Log Router D) Log Metric Answer: B Explanation: A Log Sink defines the destination (BigQuery) for selected logs, such as VPC Flow Logs. Question 22. Which type of Log-based metric is most suitable for triggering alerts when the phrase “ERROR 503” appears in logs? A) Distribution metric B) Counter metric C) Gauge metric D) Histogram metric Answer: B Explanation: Counter metrics increment each time a matching log entry occurs, ideal for counting error occurrences. Question 23. Cloud Trace is primarily used to: A) Store container images B) Visualize request latency across services C) Manage IAM policies D) Encrypt data at rest
C) Real-time performance metrics D) Static code analysis Answer: B Explanation: Gemini Cloud Assist uses generative AI to analyze logs and propose probable causes and fixes. Question 27. A GKE pod repeatedly shows CrashLoopBackOff. Which of the following is the most likely cause? A) Insufficient node CPU B) Application exiting with non-zero status C) ImagePullBackOff error D) Network firewall block Answer: B Explanation: CrashLoopBackOff occurs when the container repeatedly starts then exits with an error code. Question 28. What does the ImagePullBackOff status indicate? A) Node is out of memory B) Container failed health check C) GKE cannot retrieve the container image from the registry D) Pod was evicted due to resource limits Answer: C Explanation: ImagePullBackOff means the node cannot pull the specified image, often due to authentication or image not found. Question 29. Which autoscaler adjusts the number of Pods based on CPU utilization automatically? A) Horizontal Pod Autoscaler (HPA)
B) Vertical Pod Autoscaler (VPA) C) Cluster Autoscaler D) Node-Pool Autoscaler Answer: A Explanation: HPA scales the replica count of a Deployment based on metrics like CPU or custom metrics. Question 30. When would you prefer a Vertical Pod Autoscaler over a Horizontal Pod Autoscaler? A) Need to increase pod count during traffic spikes B) Want to adjust CPU/memory requests of existing Pods without adding more Pods C) Scale the number of nodes in the cluster D) Perform canary deployments Answer: B Explanation: VPA changes resource requests/limits of individual Pods, useful when the workload needs more resources but not more replicas. Question 31. Which GCP service provides recommendations for idle Compute Engine instances? A) Recommender API B) Cloud Asset Inventory C) Cloud Scheduler D) Cloud Billing Reports Answer: A Explanation: The Recommender API analyzes usage patterns and suggests shutting down or downsizing idle resources.
Explanation: All listed features can be used to keep data within specific regions and prevent egress. Question 35. Which IAM role grants read-only access to all monitoring data across a project? A) roles/monitoring.viewer B) roles/monitoring.metricViewer C) roles/logging.viewer D) roles/owner Answer: A Explanation: roles/monitoring.viewer provides read-only permissions for Monitoring resources. Question 36. When using Deployment Manager, which file type defines the resources to be created? A) YAML B) JSON C) Both A and B D) XML Answer: C Explanation: Deployment Manager accepts both YAML and JSON configuration files. Question 37. Which of the following is NOT a valid way to apply labels for cost tracking in GCP? A) On projects B) On folders C) On individual IAM users
D) On resources (e.g., Compute Engine instances) Answer: C Explanation: Labels can be applied to projects, folders, and resources, but not directly to IAM users. Question 38. What is the purpose of a “shared VPC” in a multi-project environment? A) To share IAM policies across projects B) To allow multiple projects to use the same VPC network resources C) To replicate data across regions automatically D) To enable cross-project billing aggregation Answer: B Explanation: Shared VPC lets service projects connect to a centrally-managed VPC owned by a host project. Question 39. Which Cloud Build feature enables parallel execution of independent steps? A) waitFor attribute set to - B) id field C) args array D) entrypoint field Answer: A Explanation: Setting waitFor: ["-"] makes the step run in parallel with previous steps that have no dependencies. Question 40. In a CI pipeline, which practice helps ensure that only code meeting security standards reaches production? A) Skipping unit tests for speed
Question 43. What does the “SLO burn rate” metric indicate? A) The speed at which the error budget is being consumed B) The amount of compute resources used per second C) The number of incidents per month D) The rate of code commits in a repository Answer: A Explanation: Burn rate measures how quickly the error budget is being used, helping teams decide whether to halt releases. Question 44. Which Cloud Logging feature allows you to create a metric that counts occurrences of a specific JSON field value? A) Log-Based Counter metric with a filter on the JSON field B) Log Sink with a custom export script C) Log Viewer search bar only D) Cloud Monitoring custom metric unrelated to logs Answer: A Explanation: Log-Based Counter metrics can be defined with filters that match specific JSON field values. Question 45. In GKE, which object defines the desired state for a set of identical Pods? A) Service B) Deployment C) ConfigMap D) Ingress Answer: B
Explanation: A Deployment manages replica sets and ensures the declared number of Pods are running. Question 46. Which GCP feature can be used to enforce that all traffic to a Cloud Run service is only allowed from a specific VPC network? A) Cloud Armor security policy B) VPC-Connector with ingress settings set to “internal-only” C) Identity-Aware Proxy (IAP) D) Service Mesh Answer: B Explanation: Configuring a VPC Connector and setting ingress to internal restricts access to traffic originating from the VPC. Question 47. Which type of Cloud Monitoring alerting policy evaluates a condition over a rolling time window? A) Threshold alert B) Rate alert C) MQL-based alert with align function D) Incident-based alert Answer: C Explanation: MQL alerts can include align functions to evaluate metrics over a rolling window. Question 48. Which GCP service helps you monitor and manage the health of a fleet of IoT devices? A) Cloud IoT Core (now deprecated) B) Cloud Monitoring C) Cloud Asset Inventory
Question 51. Which of the following is a recommended practice when granting permissions to a CI service account? A) Assign the Owner role B) Grant only the specific roles needed for the pipeline steps (least privilege) C) Use the default Compute Engine service account D) Provide Viewer role on the entire organization Answer: B Explanation: Least-privilege principle dictates giving the CI service account only the permissions it requires. Question 52. Which GCP product can be used to centrally manage firewall rules across multiple projects? A) VPC Service Controls B) Firewall Policies (hierarchical firewall) C) Cloud Armor D) Cloud CDN Answer: B Explanation: Hierarchical firewall policies allow you to define firewall rules at the organization or folder level and inherit them across projects. Question 53. In the context of MLOps on Vertex AI, what does a “pipeline” typically consist of? A) Data ingestion, model training, model evaluation, and model deployment steps B) Only model training step C) Manual data labeling process D) Real-time inference serving only Answer: A
Explanation: Vertex AI Pipelines orchestrate end-to-end ML workflows, including data preprocessing, training, evaluation, and deployment. Question 54. Which Cloud Build feature enables you to reuse a previously built Docker image without rebuilding it? A) cacheFrom directive in cloudbuild.yaml B) --no-cache flag C) gcloud builds submit --no-source D) gcloud container images list-tags Answer: A Explanation: The cacheFrom field references an existing image to use as a cache layer, speeding up builds. Question 55. Which Cloud Logging export option allows real-time streaming of logs to a Pub/Sub topic? A) Log Bucket B) Log Sink with destination set to Pub/Sub C) Log Metric D) Log Viewer Answer: B Explanation: A Log Sink can target a Pub/Sub topic, enabling near-real-time log streaming for downstream processing. Question 56. What is the primary benefit of using a “custom role” instead of a “predefined role” for a service account that only needs to read storage objects? A) Custom roles are cheaper B) Custom roles can be limited to specific buckets, reducing scope