Google Cloud Certified Compute and Container Services 2 — Questions and Answers
Question 1: A company runs a legacy application on physical servers and wants to migrate to GCP with minimal refactoring. Which compute option is most appropriate?
- Cloud Run
- Google Kubernetes Engine
- Compute Engine VMs (Correct answer)
- App Engine Standard
Correct answer: Compute Engine VMs
Compute Engine provides full control over VM configuration, making it the best choice for lift-and-shift migrations of legacy applications.
Question 2: Which App Engine environment automatically scales to zero instances when no traffic is received?
- App Engine Flexible
- App Engine Standard (Correct answer)
- Both environments
- Neither environment
Correct answer: App Engine Standard
App Engine Standard can scale to zero instances during periods of no traffic, reducing costs, while Flexible maintains at least one instance.
Question 3: A GKE workload requires access to a Cloud Storage bucket. What is the recommended way to grant this permission without using service account keys?
- Mount a service account key file as a Kubernetes secret
- Use Workload Identity to bind a Kubernetes service account to a GCP service account (Correct answer)
- Grant roles to the default compute service account
- Use Cloud IAP
Correct answer: Use Workload Identity to bind a Kubernetes service account to a GCP service account
Workload Identity is the recommended approach for GKE pods to authenticate as a GCP service account without managing key files.
Question 4: What is the purpose of Committed Use Discounts (CUDs) in Compute Engine?
- Automatically reduce costs for idle VMs
- Provide discounts in exchange for a 1-year or 3-year commitment to use specific resources (Correct answer)
- Replace Sustained Use Discounts for large workloads
- Offer spot pricing for batch jobs
Correct answer: Provide discounts in exchange for a 1-year or 3-year commitment to use specific resources
Committed Use Discounts offer up to 57% discount on Compute Engine resources in exchange for committing to use them for 1 or 3 years.
Question 5: Which Cloud Run feature allows you to deploy Cloud Run services within a VPC for private access to internal resources?
- Cloud Run Private Endpoints
- VPC Connector (Serverless VPC Access)
- Cloud Run Shared VPC
- Cloud Run Direct VPC Egress (Correct answer)
Correct answer: Cloud Run Direct VPC Egress
Cloud Run Direct VPC Egress allows Cloud Run services to send traffic directly into a VPC without needing a Serverless VPC Access connector.
Question 6: A Kubernetes deployment on GKE needs to ensure pods are spread across multiple zones for high availability. Which feature achieves this?
- Node Affinity rules
- Pod Disruption Budgets
- Topology Spread Constraints (Correct answer)
- Cluster Autoscaler
Correct answer: Topology Spread Constraints
Topology Spread Constraints control how pods are distributed across topology domains like zones, ensuring high availability.
A company runs a legacy application on physical servers and wants to migrate to GCP with minimal refactoring.
Which compute option is most appropriate?