GCP Interview Questions (50+ Detailed Q&A)
1. Compute & GKE
1. Compute Engine (GCE) vs Cloud Run vs App Engine
1. Compute Engine (GCE) vs Cloud Run vs App Engine
- GCE: IaaS. Raw VM. You manage OS, patch, scaling script.
- App Engine: PaaS. Code focus. Standard (Sandbox) vs Flexible (Docker).
- Cloud Run: Serverless Containers. Scale to zero. Protocol: HTTP/Knative.
| Service | Best For | Scale to Zero | Cold Start | Cost |
|---|---|---|---|---|
| Cloud Run | APIs, webhooks, microservices | Yes | ~1s | Pay per request |
| App Engine Std | Web apps (Python, Node, Go) | Yes | ~100ms | Pay per instance-hour |
| App Engine Flex | Custom runtimes, background workers | No | ~2min | Pay per instance-hour |
| GCE | Databases, legacy apps, full control | No | None | Pay per VM-hour |
| GKE | Complex microservices, stateful apps | No | None | Pay per node |
- Cloud Run: REST API with sporadic traffic (100 req/day)
- App Engine: Production web app with steady traffic
- GCE: PostgreSQL database, Redis cache
- GKE: 50+ microservices with service mesh
2. Preemptible vs Spot VMs
2. Preemptible vs Spot VMs
- Preemptible: Old. Max 24h life.
- Spot: New. No max duration. Variable price. Behavior: Google terminates with 30s notice.
3. GKE Standard vs Autopilot
3. GKE Standard vs Autopilot
- Standard: You manage Nodes (Upgrades, Packing). Pay per Node.
- Autopilot: Fully managed. Google manages Nodes. Pay per Pod (CPU/RAM). Locked down security (No privileged containers).
4. Live Migration
4. Live Migration
5. Cloud Functions
5. Cloud Functions
6. Machine Types
6. Machine Types
- N1/N2: General Purpose.
- E2: Cost optimized (Dynamic resource mgmt).
- C2: Compute (Gaming/AdTech).
- M2: Memory (SAP HANA).
7. Instance Groups (MIG vs Unmanaged)
7. Instance Groups (MIG vs Unmanaged)
- MIG (Managed): Scalable, Auto-healing, Identical VMs (Template).
- Unmanaged: Different VMs grouped. For legacy LB.
8. Shielded VMs
8. Shielded VMs
9. Sole Tenancy
9. Sole Tenancy
10. Cloud Run Concurrency
10. Cloud Run Concurrency
2. Storage & Database
11. Storage Classes
11. Storage Classes
- Standard: Hot.
- Nearline: 30 days. Backup.
- Coldline: 90 days. DR.
- Archive: 365 days. Tape replacement.
- Autoclass: Auto-move based on access.
12. Cloud SQL vs Spanner vs Bigtable
12. Cloud SQL vs Spanner vs Bigtable
- Cloud SQL: MySQL/PG/SQL Server. Regional. Vertical scale.
- Spanner: Global SQL. Horizontal scale. Strong consistency. Expensive.
- Bigtable: NoSQL Wide-column (HBase). IoT/TimeSeries. High throughput.
13. BigQuery Architecture
13. BigQuery Architecture
14. Firestore modes
14. Firestore modes
- Native: Modern, document, real-time sync.
- Datastore: Old mode compatibility.
15. Cloud Storage Consistency
15. Cloud Storage Consistency
16. BigQuery Partitioning vs Clustering
16. BigQuery Partitioning vs Clustering
- Partition: Physical split (Day/Hour). Reduces cost (Scans less).
- Cluster: Sorting within partition. Faster filter/agg.
17. Memorystore
17. Memorystore
18. Persistent Disk Types
18. Persistent Disk Types
- pd-standard: HDD.
- pd-balanced: SSD (Best value).
- pd-ssd: High IOPS.
- Local SSD: Physically attached, ephemeral (Lost on stop). Super fast.
19. Database Migration Service (DMS)
19. Database Migration Service (DMS)
20. Filestore
20. Filestore
3. Networking
21. Global VPC
21. Global VPC
22. Load Balancer Types
22. Load Balancer Types
- External HTTP(S): Global (Anycast IP). Layer 7.
- Internal HTTP(S): Regional (Envoy proxies).
- Network (TCP/UDP): Pass-through or Proxy.
23. Cloud Armor
23. Cloud Armor
24. Cloud CDN
24. Cloud CDN
25. Interconnect vs Peering vs VPN
25. Interconnect vs Peering vs VPN
- VPN: over Internet (IPSec). 3 Gbps. Cheap.
- Interconnect: Physical cable. Dedicated (SLA) or Partner. 10G/100G. Expensive.
- Peering: Direct connection to Google Network (Workspace/Youtube), not GCP private IP.
26. Private Service Connect (PSC)
26. Private Service Connect (PSC)
27. Shared VPC
27. Shared VPC
28. VPC Flow Logs
28. VPC Flow Logs
29. Firewalls in GCP
29. Firewalls in GCP
30. Cloud NAT
30. Cloud NAT
4. IAM & Security
31. IAM Hierarchy
31. IAM Hierarchy
32. Primitive vs Predefined vs Custom Roles
32. Primitive vs Predefined vs Custom Roles
- Primitive: Owner, Editor, Viewer (Too broad, avoid).
- Predefined:
roles/storage.objectViewer(Google managed). - Custom: You pick permissions.
33. Service Accounts
33. Service Accounts
34. Workload Identity Federation
34. Workload Identity Federation
35. IAP (Identity Aware Proxy)
35. IAP (Identity Aware Proxy)
36. VPC Service Controls
36. VPC Service Controls
37. KMS (Key Management Service)
37. KMS (Key Management Service)
38. Secret Manager
38. Secret Manager
39. Audit Logs
39. Audit Logs
40. Forseti Policy / Security Command Center
40. Forseti Policy / Security Command Center
5. Operations & Tools
41. Cloud Operations (Stackdriver)
41. Cloud Operations (Stackdriver)
42. Cloud Build
42. Cloud Build
cloudbuild.yaml.43. Deployment Manager vs Terraform
43. Deployment Manager vs Terraform
- DM: GCP native (YAML/Python).
- Terraform: Multi-cloud, Standard. (Recommended).
44. Anthos
44. Anthos
45. Pub/Sub
45. Pub/Sub
46. Dataflow (Apache Beam)
46. Dataflow (Apache Beam)
47. Dataproc
47. Dataproc
48. Billing: Committed Use Discounts (CUD)
48. Billing: Committed Use Discounts (CUD)
49. Cloud Scheduler
49. Cloud Scheduler
50. Vertex AI
50. Vertex AI
6. GCP Medium Level Questions
51. VPC Network Peering
51. VPC Network Peering
52. Cloud NAT
52. Cloud NAT
53. Cloud Armor
53. Cloud Armor
54. IAM Custom Roles
54. IAM Custom Roles
55. Service Accounts
55. Service Accounts
56. Cloud SQL High Availability
56. Cloud SQL High Availability
57. Cloud Spanner
57. Cloud Spanner
58. BigQuery Partitioning
58. BigQuery Partitioning
59. BigQuery Clustering
59. BigQuery Clustering
60. Cloud Functions Triggers
60. Cloud Functions Triggers
61. Cloud Run Autoscaling
61. Cloud Run Autoscaling
62. GKE Autopilot vs Standard
62. GKE Autopilot vs Standard
- Autopilot: Fully managed, Google manages nodes.
- Standard: More control, you manage nodes.
63. GKE Workload Identity
63. GKE Workload Identity
64. Cloud Monitoring Alerts
64. Cloud Monitoring Alerts
65. Cloud Logging Sinks
65. Cloud Logging Sinks
66. Cloud CDN
66. Cloud CDN
67. Cloud Load Balancing Types
67. Cloud Load Balancing Types
- Global HTTP(S): Layer 7, global, URL-based routing
- Global SSL/TCP: Layer 4, global
- Regional Network: Layer 4, regional
- Regional Internal: Layer 4, internal only
68. Managed Instance Groups
68. Managed Instance Groups
69. Cloud Scheduler
69. Cloud Scheduler
70. Secret Manager
70. Secret Manager
7. GCP Advanced Level Questions
71. Shared VPC
71. Shared VPC
72. VPC Service Controls
72. VPC Service Controls
73. Organization Policy Constraints
73. Organization Policy Constraints
74. Cloud Interconnect
74. Cloud Interconnect
- Dedicated: 10 Gbps or 100 Gbps
- Partner: 50 Mbps to 10 Gbps
75. Cloud Router and BGP
75. Cloud Router and BGP
76. Binary Authorization
76. Binary Authorization
77. GKE Multi-Cluster Ingress
77. GKE Multi-Cluster Ingress
78. GKE Vertical Pod Autoscaler
78. GKE Vertical Pod Autoscaler
79. Cloud Composer (Airflow)
79. Cloud Composer (Airflow)
80. Dataflow (Apache Beam)
80. Dataflow (Apache Beam)
81. Pub/Sub Message Ordering
81. Pub/Sub Message Ordering
82. Pub/Sub Dead Letter Topics
82. Pub/Sub Dead Letter Topics
83. Cloud Tasks
83. Cloud Tasks
84. Cloud Build Triggers
84. Cloud Build Triggers
85. Artifact Registry
85. Artifact Registry
86. Cloud Profiler
86. Cloud Profiler
87. Cloud Trace
87. Cloud Trace
88. Cost Optimization: Committed Use Discounts
88. Cost Optimization: Committed Use Discounts
89. Cost Optimization: Preemptible VMs
89. Cost Optimization: Preemptible VMs
90. Multi-Region Deployment Strategy
90. Multi-Region Deployment Strategy