Top 50 GCP Interview Questions (2026)

The 50 GCP questions interviewers actually ask, with direct answers, real gcloud commands, comparison tables, and what the interviewer is listening for. Grouped for freshers, intermediate, and experienced rounds.

50 questions with answers

What Is GCP?

Key Takeaways

  • GCP (Google Cloud Platform) is Google's public cloud: a set of on-demand services for compute, storage, networking, data, and machine learning, billed by usage.
  • The building blocks interviews test are the resource hierarchy (organization, folders, projects), IAM, core compute options (Compute Engine, GKE, Cloud Run, Cloud Functions), and storage and data services.
  • Interviews check judgment, not just service names: when to pick Cloud Run over GKE, how IAM roles and service accounts work, and how you'd design for cost and reliability.
  • This page is a question bank: work your tier first, read one tier up, and say answers out loud because delivery and reasoning are evaluated too.

GCP (Google Cloud Platform) is Google's public cloud. It rents out the same kind of infrastructure Google runs its own products on: virtual machines, managed Kubernetes, serverless containers and functions, object and block storage, managed databases, a data warehouse, networking, and machine learning services, all on demand and billed by what you use. You organize everything under a resource hierarchy (an organization at the top, then folders, then projects that hold resources), and you control who can do what with IAM. In interviews, GCP questions probe how you reason about trade-offs: Compute Engine versus GKE versus Cloud Run, when a regional resource beats a zonal one, how service accounts differ from user accounts, and how you'd keep a bill from surprising you. This page collects the 50 questions that come up most, each with a direct answer plus real gcloud commands and comparison tables. The Google Cloud products and services documentation is the canonical reference for what each service does; pair this bank with our AI interview preparation guides for the live-interview format, since the first GCP round is increasingly an AI-driven technical screen.

50Questions with answers on this page
3Difficulty tiers: freshers, intermediate, experienced
10Quiz questions to check yourself
45-60 minTypical length of a GCP technical round

Watch: Getting started with Google Cloud

Video: Getting started with Google Cloud (Google Cloud Tech, YouTube)

Test yourself and earn a certificate

10 quick questions. Score 70%+ to download your GCP certificate.

Jump to quiz

All Questions on This Page

50 questions
GCP Interview Questions for Freshers
  1. 1. What is GCP and what does it offer?
  2. 2. What is the GCP resource hierarchy?
  3. 3. What is a GCP project and why does it matter?
  4. 4. What is the difference between a region and a zone?
  5. 5. What is IAM in GCP and how does it work?
  6. 6. What are the types of IAM roles in GCP?
  7. 7. What is a service account and how does it differ from a user account?
  8. 8. What is Compute Engine?
  9. 9. What are the main ways to run compute on GCP?
  10. 10. What is Cloud Run and when would you use it?
  11. 11. What are Cloud Functions?
  12. 12. What is Cloud Storage and what are its storage classes?
  13. 13. What is the difference between Cloud Storage and a persistent disk?
  14. 14. What is a VPC in GCP?
  15. 15. How do firewall rules work in a GCP VPC?
  16. 16. What is BigQuery?
  17. 17. What is Cloud SQL and how does it differ from BigQuery?
  18. 18. What is the gcloud CLI and what do you use it for?
GCP Intermediate Interview Questions
  1. 19. What is GKE and what does it manage for you?
  2. 20. What is the difference between GKE Autopilot and Standard mode?
  3. 21. What is Workload Identity in GKE and why use it?
  4. 22. What are the load balancing options in GCP?
  5. 23. What is Cloud NAT and when do you need it?
  6. 24. What is Private Google Access?
  7. 25. What is a managed instance group and how does autoscaling work?
  8. 26. What are Spot VMs (preemptible instances) and when do you use them?
  9. 27. How do committed use discounts and sustained use discounts work?
  10. 28. What are IAM conditions and how do they tighten access?
  11. 29. How do you manage secrets on GCP?
  12. 30. What do Cloud Monitoring and Cloud Logging do?
  13. 31. What is Pub/Sub and when would you use it?
  14. 32. How do you provision GCP infrastructure as code?
  15. 33. Walk me through deploying and rolling back a service on Cloud Run.
  16. 34. What is Cloud CDN and how does it fit with load balancing?
  17. 35. What are organization policies and how do they differ from IAM?
  18. 36. How do you connect an on-prem network to a GCP VPC?
GCP Interview Questions for Experienced Engineers
  1. 37. How do you structure projects and folders for a large organization?
  2. 38. What is the difference between Shared VPC and VPC Peering?
  3. 39. What are VPC Service Controls and what threat do they address?
  4. 40. How do you design for high availability across regions on GCP?
  5. 41. What is Cloud Spanner and when is it the right choice?
  6. 42. How do you harden a GKE cluster?
  7. 43. How do you approach hybrid or multi-cloud with GCP?
  8. 44. How would you build a streaming data pipeline on GCP?
  9. 45. How do you approach cost optimization on GCP without hurting reliability?
  10. 46. How do you control BigQuery cost and improve query performance?
  11. 47. How do you design backup and disaster recovery on GCP?
  12. 48. How does audit logging work on GCP and why does it matter?
  13. 49. How would you plan a migration of an on-prem application to GCP?
  14. 50. Design question: architect a scalable web application on GCP.

GCP Interview Questions for Freshers

Freshers18 questions

The fundamentals every entry-level round checks: what GCP is, the resource hierarchy, IAM, the core compute and storage services, and regions versus zones. If any answer here surprises you, that's your study list.

Q1. What is GCP and what does it offer?

GCP (Google Cloud Platform) is Google's public cloud. It rents out on-demand infrastructure and managed services: virtual machines, managed Kubernetes, serverless containers and functions, object and block storage, managed databases, a data warehouse, networking, and machine learning tools, all billed by usage.

You build on it by creating a project, enabling the APIs you need, and controlling access with IAM. Teams pick GCP for its data and analytics stack (BigQuery), for Kubernetes (Google created it), and for a clean project-based way to organize resources and billing.

Key point: Lead with 'on-demand infrastructure and managed services, billed by usage'. Interviewers open with this to hear whether you understand cloud as a model, not just a list of product names.

Watch a deeper explanation

Video: Google Cloud Associate Cloud Engineer Course: Pass the Exam (freeCodeCamp.org, YouTube)

Q2. What is the GCP resource hierarchy?

GCP organizes everything in a tree: an organization at the top (tied to your domain), then folders to group things by team or environment, then projects that actually hold resources like VMs and buckets. Resources sit inside projects.

The hierarchy matters because IAM policies and organization policies flow down it. A role granted at the folder level applies to every project inside it, so you set broad policy high up and narrow, specific grants lower down. It's the backbone of how access and billing are structured.

LevelWhat it isTypical use
OrganizationRoot node tied to your domainCompany-wide policy and ownership
FolderGroups projectsBy department, team, or environment
ProjectContainer for resourcesOne app or workload's resources and billing
ResourceVMs, buckets, datasetsThe actual things you provision

Key point: Mention that IAM policies inherit down the tree. That inheritance is the whole reason the hierarchy exists, and it's a common follow-up.

Watch a deeper explanation

Video: Welcome to Google Cloud Platform: the Essentials of GCP (Google Cloud Tech, YouTube)

Q3. What is a GCP project and why does it matter?

A project is the base organizing unit in GCP. Every resource you create lives in a project, and the project holds the enabled APIs, IAM policies, and billing link for those resources. It has a name, a globally unique project ID, and a project number.

It matters because it's the boundary for access and cost. You isolate workloads by project (dev in one, prod in another), which keeps a mistake in one from touching the other and makes billing and permissions clean to reason about.

Key point: Say the project ID is globally unique and immutable. That detail comes up when someone asks how you'd reference a project in a command or config.

Q4. What is the difference between a region and a zone?

A region is a geographic area, like us-central1 or europe-west1. Each region contains several zones, like us-central1-a and us-central1-b, and a zone is a single, failure-isolated deployment area within that region.

The design rule follows from this: put replicas across multiple zones so a single zone outage doesn't take you down, and across regions if you need to survive a whole region failing or serve users closer to them. Zonal resources live in one zone; regional resources are spread across zones automatically.

Key point: it maps to availability: 'spread across zones to survive a zone outage'. That reasoning is what the question is really checking, not the definitions alone.

Q5. What is IAM in GCP and how does it work?

IAM (Identity and Access Management) controls who can do what on which resource. The model is a binding: you grant a role (a set of permissions) to a member (a user, group, or service account) on a resource. The answer to 'can this identity do this action here' comes from those bindings plus inheritance down the hierarchy.

The principle to state is least privilege: grant the narrowest role that gets the job done, at the lowest level that's needed, rather than handing out broad Owner or Editor roles. That's what keeps a compromised identity from touching everything.

Key point: The three parts is explicit: member, role, resource. the key point is you frame IAM as bindings, not just 'permissions'.

Watch a deeper explanation

Video: What is Cloud IAM? (Google Cloud Tech, YouTube)

Q6. What are the types of IAM roles in GCP?

There are three kinds. Basic roles (Owner, Editor, Viewer) are broad and legacy, and you avoid them in production because they're too coarse. Predefined roles are curated by Google for a specific service (like Storage Object Viewer), and they're the everyday choice. Custom roles are ones you build from a hand-picked list of permissions when no predefined role fits.

The guidance is to reach for predefined roles first and drop to a custom role only when you need a tighter set. Basic roles are a smell in a real environment because they grant far more than most workloads need.

Role typeScopeWhen to use
Basic (Owner/Editor/Viewer)Very broad, project-wideAvoid in production, too coarse
PredefinedCurated per serviceThe default everyday choice
CustomPermissions you pickWhen no predefined role fits tightly

Key point: Say you avoid basic roles in production. Recommending Editor for a workload is a red flag that signals you don't think about least privilege.

Q7. What is a service account and how does it differ from a user account?

A service account is an identity for an application, VM, or workload, not a person. Code uses it to authenticate to GCP APIs. A user account belongs to a human who logs into the console. The difference is who or what is acting: service accounts are for machines, user accounts for people.

You attach a service account to a resource like a Compute Engine VM or a Cloud Run service, grant it a least-privilege role, and the workload gets short-lived credentials automatically. That's far safer than shipping a human's credentials or a long-lived key file with the app.

bash
# create a service account and grant it a narrow role
gcloud iam service-accounts create app-sa --display-name="app sa"
gcloud projects add-iam-policy-binding my-project \
  --member="serviceAccount:app-sa@my-project.iam.gserviceaccount.com" \
  --role="roles/storage.objectViewer"

Key point: Frame service accounts as 'identity for workloads, not people'. The follow-up is usually how to avoid key files, so mention attaching the account to the resource.

Q8. What is Compute Engine?

Compute Engine is GCP's infrastructure-as-a-service: virtual machines you provision and manage yourself. You pick a machine type (CPU and memory), a boot image, a zone, disks, and networking, and you're responsible for the OS and what runs on it.

It's the most flexible and the most hands-on option. You reach for it when you need full control of the machine, custom software, or a lift-and-shift of an existing workload, and you accept managing patching, scaling, and availability yourself.

bash
gcloud compute instances create web-1 \
  --zone=us-central1-a \
  --machine-type=e2-medium \
  --image-family=debian-12 \
  --image-project=debian-cloud

Key point: Position Compute Engine as 'most control, most responsibility'. The natural follow-up compares it to Cloud Run and GKE, so have that contrast ready.

Q9. What are the main ways to run compute on GCP?

Four common options, from most control to most managed: Compute Engine (raw VMs you manage), GKE (managed Kubernetes for orchestrated containers), Cloud Run (serverless stateless containers that scale to zero), and Cloud Functions (event-driven functions for small pieces of code).

The choice is about how much you want to manage versus control. Take a VM when you need the whole machine, GKE when you're running many containerized services that need orchestration, Cloud Run when you have a container and want it to just run and scale, and Cloud Functions for glue code triggered by an event.

ServiceYou manageBest for
Compute EngineThe VM and OSFull control, lift-and-shift, custom software
GKEThe cluster (less in Autopilot)Many orchestrated containers, portability
Cloud RunJust the containerStateless web services, scale to zero
Cloud FunctionsJust the function codeEvent-driven glue and small tasks

Key point: Order them by 'how much you manage' and give one clear use case each. Interviewers use this to see if you can match a workload to the right service.

Q10. What is Cloud Run and when would you use it?

Cloud Run runs your stateless container and handles the rest: it scales up with traffic, scales to zero when idle, and charges only for the time it spends handling requests. You give it a container image and it gives you an HTTPS endpoint, with no servers or clusters to manage.

You use it for web services, APIs, and event handlers that are stateless and containerized, especially when traffic is spiky or low, since scale-to-zero means you pay nothing while idle. It's the sweet spot between a raw VM and a full Kubernetes cluster for a single service.

bash
gcloud run deploy web \
  --image=gcr.io/my-project/web:1.4 \
  --region=us-central1 \
  --allow-unauthenticated

Key point: Highlight scale-to-zero and per-request billing. Those two properties are exactly why someone picks Cloud Run over GKE for a small service.

Watch a deeper explanation

Video: Cloud Run in a minute (Google Cloud Tech, YouTube)

Q11. What are Cloud Functions?

Cloud Functions is GCP's function-as-a-service: you write a small piece of code, deploy it, and it runs in response to an event, an HTTP request, a file landing in a bucket, a message on Pub/Sub, without you managing any server. It scales automatically and you pay per invocation and runtime.

It's the right tool for small, event-driven tasks: resize an image when it's uploaded, process a message off a queue, run a lightweight webhook. For a full application with many routes and its own container, Cloud Run is usually the better fit.

Key point: Distinguish it from Cloud Run: functions for event-driven snippets, Cloud Run for full containerized services. Blurring the two is a common junior slip.

Q12. What is Cloud Storage and what are its storage classes?

Cloud Storage is object storage for unstructured data: files, images, videos, backups, logs. You put objects into buckets, each addressed by a globally unique name, and access them over HTTPS. It's not a filesystem or a database; it's for blobs.

Storage classes trade cost against access frequency: Standard for hot, frequently-read data; Nearline for data accessed about monthly; Coldline for quarterly; and Archive for rarely-touched, long-term retention. Colder classes are cheaper to store but cost more to retrieve, so you match the class to how often you'll read the data.

ClassAccess patternTrade-off
StandardFrequent, hot dataHighest storage cost, cheap access
NearlineAbout once a monthLower storage, retrieval fee
ColdlineAbout once a quarterCheaper storage, higher retrieval
ArchiveRarely, long-term keepCheapest storage, highest retrieval

Key point: The retrieval-cost trade-off, not just the class names. 'Cheaper to store, pricier to read' is the insight the question is testing.

Q13. What is the difference between Cloud Storage and a persistent disk?

Cloud Storage is object storage: buckets of files reached over an API, accessible from anywhere, not attached to a single VM. A persistent disk is block storage: a virtual disk you attach to a Compute Engine VM, formatted with a filesystem, behaving like a hard drive for that machine.

So you'd keep uploads, backups, and static assets in Cloud Storage, and use a persistent disk for a VM's boot volume or a database's data directory that needs low-latency block access. They solve different problems, object versus block.

Key point: Frame it as object storage versus block storage. Interviewers ask this to check you know Cloud Storage isn't a mountable disk.

Q14. What is a VPC in GCP?

A VPC (Virtual Private Cloud) is your private, software-defined network on GCP. It holds subnets, controls IP ranges, and connects your resources, VMs, GKE nodes, and more, so they can talk to each other and to the internet under rules you set.

A distinctive GCP trait is that VPCs are global: one VPC spans all regions, and its subnets are regional. That means resources in different regions can sit in the same VPC and communicate over Google's private network without you stitching networks together per region.

Key point: Mention that GCP VPCs are global with regional subnets. That global scope surprises people coming from AWS and is a favorite distinguishing detail.

Q15. How do firewall rules work in a GCP VPC?

Firewall rules allow or deny traffic to and from resources based on direction (ingress or egress), protocol and port, and a source or target. You target resources by network tags or by service account, which is cleaner than listing IPs. The rules are stateful, so a return packet for an allowed connection is automatically permitted.

By default a VPC denies inbound and allows outbound, and you add rules with priorities where a lower number wins. A common pattern is denying broadly and allowing narrowly: open port 443 to a tagged web tier, and only allow the database port from the app tier's tag.

bash
# allow HTTPS to VMs tagged 'web'
gcloud compute firewall-rules create allow-https \
  --network=default --direction=INGRESS --action=ALLOW \
  --rules=tcp:443 --target-tags=web --source-ranges=0.0.0.0/0

Key point: Say rules are stateful and can target by tag or service account. Both details show you've actually written firewall rules, not just read about them.

Q16. What is BigQuery?

BigQuery is GCP's serverless data warehouse. You load or stream data into tables and run SQL analytics over huge datasets without provisioning or managing any servers. It separates storage from compute, so each scales on its own and you pay for storage plus the data your queries scan.

It's built for analytics, not transactions: fast aggregation across billions of rows for dashboards, reporting, and data science, not for high-frequency single-row reads and writes. That's what a relational database like Cloud SQL is for.

Key point: Contrast it with an OLTP database: BigQuery is for analytics over big data, not per-row transactions. Confusing the two is a common mistake.

Watch a deeper explanation

Video: BigQuery in a minute (Google Cloud Tech, YouTube)

Q17. What is Cloud SQL and how does it differ from BigQuery?

Cloud SQL is a managed relational database service: fully managed MySQL, PostgreSQL, or SQL Server. Google handles patching, backups, replication, and failover, and you use it like a normal transactional database for an application's reads and writes.

The difference from BigQuery is the workload. Cloud SQL is OLTP: many small, fast transactions, an app's live data. BigQuery is OLAP: heavy analytical queries scanning large volumes. You often run both, an app on Cloud SQL, and analytics on data exported into BigQuery.

Cloud SQLBigQuery
WorkloadTransactional (OLTP)Analytical (OLAP)
Typical useAn app's live databaseReporting and analytics at scale
Scaling modelInstance-based, you size itServerless, scales with the query

Key point: Use the OLTP versus OLAP framing. Knowing that Cloud SQL runs the app and BigQuery runs the analytics is exactly what this comparison checks.

Q18. What is the gcloud CLI and what do you use it for?

gcloud is the command-line tool for GCP. You use it to create and manage resources, VMs, buckets, clusters, IAM bindings, from a terminal or a script, instead of clicking through the console. It's part of the broader Cloud SDK, which also includes gsutil for Cloud Storage and bq for BigQuery.

It matters for interviews because scripting and automation lean on it, and reproducible infrastructure is built from commands and configs, not console clicks. Knowing gcloud config for switching projects and accounts is the everyday starting point.

bash
gcloud config set project my-project
gcloud auth login
gcloud compute instances list
gcloud projects add-iam-policy-binding my-project \
  --member="user:jane@example.com" --role="roles/viewer"

Key point: Mention gcloud config for switching project and account context. It's the small detail that shows you've actually worked in the CLI day to day.

Back to question list

GCP Intermediate Interview Questions

Intermediate18 questions

For candidates with working experience: GKE operations, IAM at depth, networking, load balancing, storage design, and the judgment questions that separate service users from architects.

Q19. What is GKE and what does it manage for you?

GKE (Google Kubernetes Engine) is GCP's managed Kubernetes. It runs the Kubernetes control plane for you (the API server, scheduler, etcd) and provisions the worker nodes, so you get a working cluster without building and patching the control plane by hand.

It handles the operational parts that are painful to run yourself: control-plane upgrades, node auto-repair and auto-upgrade, cluster and Pod autoscaling, and integration with GCP load balancing, IAM, and logging. You still write your own Kubernetes manifests; GKE just runs the cluster reliably underneath.

Key point: Say GKE manages the control plane and node lifecycle. Naming exactly what's offloaded shows you understand what 'managed Kubernetes' actually buys you.

Q20. What is the difference between GKE Autopilot and Standard mode?

In Standard mode you manage the node pools: you choose machine types, node counts, and autoscaling, and you pay for the node VMs whether or not Pods fully use them. You get full control and can tune the nodes.

In Autopilot mode Google manages the nodes entirely. You just deploy workloads, and you're billed for the CPU and memory your Pods request, not for whole node VMs. It trades some flexibility for less operational work and tighter cost-to-usage, which suits teams that want Kubernetes without managing infrastructure.

StandardAutopilot
Node managementYou manage node poolsGoogle manages nodes
BillingPer node VMPer Pod resource request
Best forFull control, custom nodesLess ops, pay for what Pods use

Key point: The billing difference: per-node versus per-Pod-request. That's the practical distinction interviewers push on after the definitions.

Q21. What is Workload Identity in GKE and why use it?

Workload Identity lets a Kubernetes service account in GKE act as a GCP service account, so Pods can call GCP APIs with proper IAM permissions without a service account key file mounted in the cluster. You bind the Kubernetes service account to the GCP one, and Pods get short-lived credentials automatically.

You use it because static key files are a security liability: they leak, they don't rotate, and they're hard to audit. Workload Identity is the recommended way for GKE workloads to authenticate to GCP, replacing the old pattern of copying a key into a Secret.

Key point: Frame it as 'no key files in the cluster'. The security reasoning, short-lived credentials over static keys, is what the question is really testing.

Q22. What are the load balancing options in GCP?

GCP splits load balancers by traffic type and reach. A global external Application Load Balancer handles HTTP and HTTPS worldwide from a single anycast IP, routing by URL and terminating TLS. Network Load Balancers handle TCP and UDP at layer 4. There are internal load balancers for traffic that stays inside your VPC, and passthrough versus proxy variants depending on whether the LB terminates the connection.

The practical choices: a global external Application Load Balancer for a public web app that needs one IP and content-based routing across regions, and an internal load balancer for backend service-to-service traffic. Picking the right one comes down to layer 7 versus layer 4, external versus internal, and global versus regional.

TypeLayerReachUse for
Application LB (external)L7 (HTTP/S)GlobalPublic web apps, URL routing
Network LBL4 (TCP/UDP)RegionalNon-HTTP, high-throughput traffic
Internal LBL4 or L7Within the VPCBackend service-to-service

Key point: Sort the answer by L7 vs L4 and external vs internal. That structure shows you can pick a load balancer from requirements, not just name them.

Q23. What is Cloud NAT and when do you need it?

Cloud NAT gives VMs and GKE nodes that have no external IP a way to reach the internet for outbound connections (pulling packages, calling external APIs) while staying unreachable from the outside. It's a managed network address translation service, so there's no NAT gateway VM for you to run.

You need it when you keep instances private for security, no public IP, but they still need to make egress calls. Without Cloud NAT, a private VM can talk inside the VPC and to Google APIs via Private Google Access, but not to the general internet.

Key point: Say it's for outbound-only from private instances. Clarifying that it doesn't allow inbound is the distinction the key signal is.

Q24. What is Private Google Access?

Private Google Access lets VMs without external IPs reach Google APIs and services (Cloud Storage, BigQuery, and others) over Google's internal network instead of the public internet. You enable it on a subnet, and private instances can then call those APIs without a public IP or Cloud NAT.

It's part of keeping workloads private: instances stay off the public internet but still use managed services. Pair it with Private Service Connect or VPC Service Controls when you need tighter isolation of which services can be reached and from where.

Key point: Distinguish it from Cloud NAT: Private Google Access reaches Google APIs privately, Cloud NAT reaches the general internet. Mixing them up is a common gap.

Q25. What is a managed instance group and how does autoscaling work?

A managed instance group (MIG) runs a set of identical Compute Engine VMs from an instance template. It keeps the desired number running (recreating failed ones via autohealing), supports rolling updates to a new template, and can autoscale based on CPU utilization, load balancer serving capacity, or a custom metric.

Autoscaling watches the chosen signal and adds or removes VMs between a min and max you set. Combined with a load balancer and health checks, a MIG is how you run a self-healing, scalable VM-based service, the Compute Engine equivalent of what a Deployment plus HPA does in Kubernetes.

bash
gcloud compute instance-groups managed set-autoscaling web-mig \
  --max-num-replicas=10 --min-num-replicas=2 \
  --target-cpu-utilization=0.6 --zone=us-central1-a

Key point: Compare a MIG to a Kubernetes Deployment plus HPA. Drawing that parallel shows you understand autoscaling as a pattern, not just a GCP feature.

Q26. What are Spot VMs (preemptible instances) and when do you use them?

Spot VMs are Compute Engine instances offered at a steep discount because GCP can reclaim them at short notice when it needs the capacity. They can be shut down at any time, so they're not for anything that must stay up continuously.

You use them for fault-tolerant, interruptible work: batch processing, CI runners, rendering, data pipelines, and stateless workers that can restart cleanly if a VM disappears. The pattern is designing the job to checkpoint or retry, then running the bulk of the fleet on Spot to cut cost hard.

Key point: Pair the discount with 'must tolerate interruption'. Suggesting Spot VMs for a stateful production database is exactly the wrong-fit answer they're screening against.

Q27. How do committed use discounts and sustained use discounts work?

Sustained use discounts apply automatically to Compute Engine when a VM runs for a large part of the month; the longer it runs, the bigger the automatic discount, with no commitment. Committed use discounts are a deal you opt into: you commit to a certain amount of vCPU and memory (or spend) for one or three years in exchange for a larger, predictable discount.

The strategy is layering: cover your steady baseline load with committed use discounts for the best rate, let sustained use discounts help on top, and run interruptible bursty work on Spot VMs. Right-sizing first, so you're not committing to waste, comes before any of it.

Key point: Order the cost levers: right-size, then commit for baseline, then Spot for bursty. Jumping to discounts before right-sizing indicates cost-naive.

Q28. What are IAM conditions and how do they tighten access?

IAM conditions add rules to a role binding so it only applies when the condition is true. You can gate access by request time (a temporary grant that expires), by resource attributes (only buckets whose name starts with a prefix), or by other context. The binding grants the role only when the condition matches.

They tighten least privilege beyond just picking a narrow role: you can give someone Storage Admin, but only on resources tagged for their team, or only until the end of the week. It turns a broad grant into a scoped, sometimes time-limited one.

Key point: Give a concrete example like a time-bound grant or a resource-name prefix. A specific condition proves you've used them rather than just heard the term.

Q29. How do you manage secrets on GCP?

Secret Manager is the dedicated service: you store secrets (API keys, passwords, certificates) there, version them, and grant access with IAM per secret. Applications fetch a secret at runtime using their service account, so nothing sensitive lives in code, images, or environment files checked into a repo.

The practices that matter: least-privilege IAM on each secret so only the workload that needs it can read it, versioning so you can rotate without breaking running services, and audit logging of who accessed what. Never bake a credential into a container image or commit it to source control.

bash
# store and access a secret
gcloud secrets create db-password --replication-policy=automatic
echo -n "s3cr3t" | gcloud secrets versions add db-password --data-file=-
gcloud secrets versions access latest --secret=db-password

Key point: Cover per-secret IAM, versioning for rotation, and audit logs. A one-line 'use Secret Manager' misses what the question is actually probing.

Q30. What do Cloud Monitoring and Cloud Logging do?

Cloud Monitoring (part of the operations suite, formerly Stackdriver) collects metrics from GCP resources and your apps, drives dashboards and alerting policies, and runs uptime checks. Cloud Logging collects, stores, and lets you query logs from services and applications, with log-based metrics and export to BigQuery or Cloud Storage for retention.

Together they're your observability layer: metrics to notice a problem and alert on it, logs to see the detail of what happened, and traces (via Cloud Trace) to follow a request across services. Setting up alerting policies on the signals that reflect user impact is the part interviewers care about.

Key point: Map monitoring to metrics-and-alerts and logging to searchable events. Showing how they combine for observability beats defining each in isolation.

Q31. What is Pub/Sub and when would you use it?

Pub/Sub is GCP's managed messaging service. Publishers send messages to a topic, and subscribers receive them from subscriptions, decoupled and asynchronous. It scales to high throughput, buffers bursts, and delivers at least once, so a slow or failed consumer doesn't lose messages or block the producer.

You reach for it to decouple services, absorb spikes, and fan out events: an order service publishes an event, and billing, inventory, and email services each consume it independently. It's the backbone for event-driven architectures and streaming pipelines feeding Dataflow or BigQuery.

Key point: Say 'decouple producers from consumers, at least once delivery'. Naming the delivery guarantee signals you've thought about duplicate handling, a common follow-up.

Q32. How do you provision GCP infrastructure as code?

Terraform is the common choice: you declare the resources you want (VMs, buckets, IAM bindings, networks) in config, and terraform plan then apply reconciles reality to that config. GCP's own tool is Cloud Deployment Manager, and newer options include the Config Connector for managing GCP resources through Kubernetes, but Terraform dominates in practice.

The value is reproducibility and review: infrastructure lives in version control, changes go through pull requests where the plan is inspected before apply, and you can stand up an identical environment from the same code. Store Terraform state remotely (a GCS bucket) with locking so a team doesn't corrupt it.

bash
terraform init      # set up the GCS backend
terraform plan      # show what will change
terraform apply     # provision the GCP resources

Key point: Mention remote state in a GCS bucket with locking. That operational detail separates someone who's run Terraform on a team from someone who's only tried it solo.

Q33. Walk me through deploying and rolling back a service on Cloud Run.

First build the container and push it to Artifact Registry, then run gcloud run deploy to point the service at that image. Cloud Run creates a new revision and, by default, sends traffic to it. You can also split traffic between revisions to do a gradual rollout and watch metrics before shifting everything.

If the new revision misbehaves, rollback is fast: route traffic back to the previous revision with a traffic update, no rebuild required, because Cloud Run keeps prior revisions. That revision model is what makes deploy and rollback on Cloud Run low-risk.

bash
# deploy a new revision
gcloud run deploy web --image=us-docker.pkg.dev/my-project/app/web:1.5 --region=us-central1

# something's wrong: send traffic back to the previous revision
gcloud run services update-traffic web --to-revisions=web-00023-abc=100 --region=us-central1

Deploying a container to Cloud Run

1Build
build the image and push it to Artifact Registry
2Deploy
gcloud run deploy points the service at the new image
3Route
Cloud Run shifts traffic; use revisions to split or roll back
4Observe
watch metrics and logs, roll back to the prior revision if bad

Cloud Run keeps every deploy as a revision, so a rollback is routing traffic back to the previous revision, no rebuild needed.

Key point: Mention traffic splitting and revision-based rollback. Knowing rollback is a traffic change, not a rebuild, is what shows real Cloud Run experience.

Q34. What is Cloud CDN and how does it fit with load balancing?

Cloud CDN caches your content at Google's edge locations close to users, so cacheable responses are served from the edge instead of traveling back to your origin every time. That cuts latency for users and load on your backends. You enable it on a backend of an external Application Load Balancer.

It fits because the load balancer is already the front door for your app; turning on Cloud CDN makes that front door cache static assets and cacheable responses. You control what's cached with cache-control headers and cache keys, and the origin only sees requests that miss the cache.

Key point: Note that Cloud CDN attaches to the external Application Load Balancer backend. Connecting the two shows you understand how edge caching plugs into the request path.

Q35. What are organization policies and how do they differ from IAM?

IAM answers 'who can do what'. Organization policies answer 'what's allowed to exist or happen at all', regardless of who's asking. They're guardrails set at the org, folder, or project level: block external IPs on VMs, restrict which regions resources can be created in, disallow service account key creation, and more.

The difference is direction. IAM grants capabilities to identities; org policies constrain configurations across the whole hierarchy. You use org policies to enforce company-wide rules that even a project Owner can't override, which is how platform teams keep hundreds of projects compliant.

Key point: The crisp split: IAM is who-can-do-what, org policy is what's-allowed-to-exist. That framing is exactly what the question checks.

Q36. How do you connect an on-prem network to a GCP VPC?

Two main options. Cloud VPN builds an encrypted IPsec tunnel over the public internet between your on-prem gateway and GCP; it's quick to set up and cheaper, but throughput per tunnel is limited and it rides shared internet paths. Cloud Interconnect gives a private physical connection: Dedicated Interconnect is a direct link into Google's network, and Partner Interconnect goes through a service provider, both offering higher, more consistent bandwidth and lower latency without touching the public internet.

The choice follows the requirement. Use Cloud VPN for modest bandwidth, quick standup, or a backup path. Use Interconnect when you need large, steady throughput and predictable latency, for example heavy data transfer or a production hybrid setup. Pair either with Cloud Router so routes are exchanged dynamically over BGP instead of being maintained by hand.

Cloud VPNCloud Interconnect
PathEncrypted over public internetPrivate physical connection
BandwidthModest, per-tunnel limitsHigh and consistent
Best forQuick setup, backup, low volumeHeavy, steady, low-latency traffic

Key point: Mention Cloud Router and BGP for dynamic routing. Knowing routes are exchanged, not hand-maintained, shows you've actually wired up hybrid connectivity.

Back to question list

GCP Interview Questions for Experienced Engineers

Experienced14 questions

advanced rounds probe architecture, security boundaries, multi-project design, and production scars. Expect every answer here to draw a follow-up about trade-offs, cost, and failure modes.

Q37. How do you structure projects and folders for a large organization?

Start from the resource hierarchy as an isolation and policy tool. Group by environment and team using folders (a prod folder, a non-prod folder, per-department folders), and give each workload and environment its own project so blast radius, IAM, quotas, and billing stay separated. A shared VPC in a host project lets many service projects use one network without each managing its own.

Set broad guardrails high up with organization policies and IAM at the folder level, then grant specific access per project. This is the landing-zone idea: a repeatable, policy-enforced structure so new teams get compliant projects by default. The failure to avoid is one giant project holding everything, where a single bad IAM grant or quota hit touches unrelated workloads.

Key point: The shared VPC and folder-level policy inheritance. The production-ready answer designs for isolation and default compliance, not just 'make a project per app'.

Q38. What is the difference between Shared VPC and VPC Peering?

Shared VPC lets several projects share one central VPC hosted in a host project: network admins manage the network centrally while service projects deploy resources into its subnets. It's for one organization wanting centralized network control across many projects.

VPC Peering connects two separate VPCs (often across projects or organizations) so their resources can reach each other over private IPs, but each side keeps its own network administration and there's no transitive peering. Use Shared VPC for centralized control inside your org, and peering to connect otherwise-independent networks. For hub-and-spoke at scale, Network Connectivity Center or a transit design replaces a mesh of peerings.

Shared VPCVPC Peering
ModelOne VPC shared across projectsTwo separate VPCs connected
AdminCentralized in the host projectEach VPC managed independently
Transitive?N/A, single networkNo, peering isn't transitive

Key point: Call out that peering isn't transitive. That limitation is the gotcha interviewers use to see if you've designed real multi-VPC networks.

Q39. What are VPC Service Controls and what threat do they address?

VPC Service Controls draw a security perimeter around managed services like Cloud Storage and BigQuery, so data can't move across the boundary even if credentials are valid. Inside the perimeter, services can talk to each other; a request from outside, or an attempt to copy data out, is blocked regardless of IAM.

The threat they address is data exfiltration: a stolen credential, a misconfigured IAM grant, or a malicious insider trying to read a bucket and send it elsewhere. IAM controls identity; VPC Service Controls add a network-style boundary around the data itself, so the two together give defense in depth.

Key point: Frame it as anti-exfiltration on top of IAM. Explaining that it blocks data movement even with valid credentials is the insight that lands.

Q40. How do you design for high availability across regions on GCP?

Start from the requirement, not the architecture: what RTO and RPO does the business actually need, because true active-active multi-region is expensive. Common tiers are multi-zone within one region (handles a zone failure, cheap), a warm standby in a second region (failover in minutes), and active-active across regions (highest availability, hardest because of data replication).

On GCP, use a global external Application Load Balancer to route users to the nearest healthy region, and pick data services deliberately: multi-region Cloud Storage buckets, and Spanner when you genuinely need globally-consistent, horizontally-scalable relational data. The hard part is always the data: replication latency, consistency, and conflict handling. Rehearse failover, because an untested failover plan usually fails when it's needed.

Key point: Anchor on RTO/RPO and 'the data is the hard part'. Jumping to active-active without the cost and consistency discussion indicates inexperienced.

Q41. What is Cloud Spanner and when is it the right choice?

Cloud Spanner is a fully managed relational database that scales horizontally while keeping strong (external) consistency and SQL, across regions if you want. It solves the usual trade-off where you had to give up either relational consistency or horizontal scale.

It's the right choice when you genuinely need both: a relational schema with transactions and joins, and scale or global distribution beyond what a single Cloud SQL instance handles. It's the wrong choice when Cloud SQL fits, because Spanner costs more and has design constraints (schema and primary-key design matter a lot to avoid hotspots). Reach for it on real global-scale relational needs, not by default.

Key point: Say 'Cloud SQL first, Spanner when you truly need global scale with consistency'. Defaulting to Spanner is an over-engineering red flag.

Q42. How do you harden a GKE cluster?

Layer the controls. Use Workload Identity so Pods authenticate to GCP without key files, run a private cluster so nodes have no public IPs, and restrict control-plane access with authorized networks. Enforce least-privilege Kubernetes RBAC, apply NetworkPolicies (default-deny, then allow) to segment Pod traffic, and keep nodes patched with auto-upgrade.

Then add supply-chain and runtime protection: Binary Authorization so only signed, approved images can deploy, image and vulnerability scanning in Artifact Registry, restrictive Pod security standards, and audit logging. The mindset is defense in depth, no single control is enough, and the cluster is a high-value target because it can reach the rest of your GCP environment.

Key point: The Workload Identity, private clusters, NetworkPolicies, and Binary Authorization. A layered answer beats naming one control, since interviewers probe for depth here.

Q43. How do you approach hybrid or multi-cloud with GCP?

The GCP answer for consistent Kubernetes across environments is GKE Enterprise (formerly Anthos): run GKE on-prem or in other clouds with one control plane, config management (Config Sync from a Git repo), and policy enforcement, so clusters stay consistent wherever they run. Containers and Kubernetes are the portability layer, since a manifest runs the same on any conformant cluster.

The honest senior take is to question whether you need it. Multi-cloud adds real complexity, networking, identity, data gravity, duplicated tooling, so you take it on for concrete reasons: regulatory data residency, avoiding lock-in for a specific critical workload, or an existing on-prem estate. Adopting multi-cloud without a driving requirement usually costs more than it saves.

Key point: Being willing to say 'you probably don't need multi-cloud' is the strong signal. Reflexive multi-cloud enthusiasm indicates chasing a buzzword.

Q44. How would you build a streaming data pipeline on GCP?

A common shape: events land in Pub/Sub as the ingestion buffer, Dataflow (managed Apache Beam) processes the stream (parse, enrich, window, aggregate) with autoscaling and exactly-once semantics, and results land in BigQuery for analytics or in Cloud Storage or Bigtable depending on the access pattern. The same Beam pipeline can run in batch or streaming mode.

The design choices that matter: Pub/Sub decouples producers from the pipeline and absorbs bursts, Dataflow handles late and out-of-order data with windowing and watermarks, and BigQuery gives serverless SQL over the output. For lower-cost batch or where you already run Spark, Dataproc is the alternative to Dataflow. Match the sink to how the data will be read.

Key point: Lay out ingest, process, store with a service for each and a reason. Naming windowing and late-data handling shows you've built streaming, not just batch.

Q45. How do you approach cost optimization on GCP without hurting reliability?

Measure first: use billing exports to BigQuery and labels on resources to attribute spend to teams and services, because cutting blind hurts reliability. Then work the big levers: right-size over-provisioned VMs, use autoscaling to match capacity to demand, buy committed use discounts for steady baseline load, run interruptible work on Spot VMs, and move cold data to Nearline, Coldline, or Archive storage classes.

The reliability guardrail matters: don't cut redundancy that protects availability, and watch BigQuery query cost by setting per-query byte limits and partitioning or clustering tables so queries scan less. The biggest wins are usually killing waste, idle resources, forgotten dev environments, oversized disks, rather than degrading production.

Key point: Lead with 'attribute spend with labels before cutting', and mention BigQuery scan cost. Framing cost as an engineering discipline beats reciting a discount list.

Q46. How do you control BigQuery cost and improve query performance?

BigQuery on-demand pricing charges by bytes scanned, so the goal is scanning less. Partition tables (usually by date) so a query touches only the relevant partitions, cluster on the columns you filter and join on so related data sits together, and select only the columns you need rather than SELECT *, since scanning is column-based. Avoid re-scanning by materializing common results.

On the pricing model, on-demand suits spiky, unpredictable usage, while capacity-based (slot reservations) gives predictable cost for steady heavy workloads. Set custom quotas or per-query maximum-bytes-billed as a guardrail so one runaway query can't blow the budget. Partitioning plus clustering plus tight column selection is where most of the savings and speed come from.

sql
-- partitioned + clustered table scans far less
CREATE TABLE ds.events
PARTITION BY DATE(event_time)
CLUSTER BY user_id AS
SELECT * FROM ds.raw_events;

-- then filter on the partition column to prune scans
SELECT user_id, COUNT(*)
FROM ds.events
WHERE DATE(event_time) = '2026-07-01'
GROUP BY user_id;

Key point: The partitioning, clustering, and column selection together. Knowing cost tracks bytes scanned, not rows, is the core insight the question needs.

Q47. How do you design backup and disaster recovery on GCP?

Define RPO and RTO first, then match tools to them. For data: persistent disk snapshots on a schedule, automated Cloud SQL backups plus point-in-time recovery, cross-region replication or multi-region buckets for Cloud Storage, and exports of critical datasets. Store backups in a separate project or region so one compromised environment can't destroy both the data and its backups.

For recovery: keep infrastructure as code so you can rebuild an environment from Terraform, script and rehearse the restore, and test it regularly because an untested backup is a guess. The DR pattern (backup-and-restore, pilot light, warm standby, or active-active) follows from the RTO and RPO the business will pay for, not the other way round.

Key point: Insist on 'backups in a separate project or region' and 'test the restore'. Both are the scars that distinguish someone who's actually run DR.

Q48. How does audit logging work on GCP and why does it matter?

Cloud Audit Logs record who did what, where, and when. Admin Activity logs (config changes) are on by default and free; Data Access logs (reads and writes of data) must be enabled and can be high volume. Together they give a trail for security investigations, compliance, and figuring out what changed before an incident.

The practices that matter: enable Data Access logging on sensitive services, export logs to a locked-down bucket or BigQuery in a separate security project so they can't be tampered with, set retention to meet compliance, and alert on suspicious actions like a new owner grant or a firewall opened wide. Logs you can't trust or query aren't much use, so treat the log pipeline as part of the security design.

Key point: Distinguish Admin Activity from Data Access logs and mention exporting to a separate project. That separation is the detail that shows real security-operations experience.

Q49. How would you plan a migration of an on-prem application to GCP?

discovery and a strategy per workload, the classic options are rehost (lift-and-shift to Compute Engine, fastest, least benefit), replatform (move to managed services like Cloud SQL or GKE with light changes), and refactor (re-architect for cloud-native, most benefit, most effort) comes first. Pick per app based on value and risk, not one blanket approach.

Then sequence it: set up the landing zone (org, projects, networking, IAM, guardrails) first, migrate low-risk workloads to build confidence, handle data migration deliberately (Storage Transfer Service, Database Migration Service, or Transfer Appliance for huge datasets), and plan cutover with a rollback path. Migrate in waves with validation at each step rather than a big-bang move, because a staged migration is where you catch the surprises safely.

Key point: The rehost/replatform/refactor spectrum and 'landing zone first, then waves'. A blanket lift-and-shift-everything answer misses the judgment this question tests.

Q50. Design question: architect a scalable web application on GCP.

Clarify first: expected traffic and spikes, is it stateless, what data does it need, latency and availability targets, and budget. Then lay out a typical shape: a global external Application Load Balancer with Cloud CDN at the front, the app running on Cloud Run or GKE (Cloud Run for a single stateless service, GKE when there are many services to orchestrate), a managed database (Cloud SQL, or Spanner for global scale), Cloud Storage for user uploads and static assets, and Memorystore for caching hot reads.

For the operational wrapper: keep instances stateless so they scale horizontally and push state to the managed data services, spread across zones (and regions if the availability target needs it), use IAM and service accounts with least privilege, secrets in Secret Manager, and observability with Cloud Monitoring, Logging, and Trace. The structure that scores is clarify, pick services with reasons, make it stateless and multi-zone, then secure and observe it, each choice justified by the requirements you asked for.

Key point: Open by asking clarifying questions before designing. Jumping straight to a service list, without requirements, is the most common way to underperform on a design prompt.

Back to question list

GCP vs AWS and Azure: Where It Fits

GCP, AWS, and Azure all rent compute, storage, and networking, so the differences are about strengths and defaults, not raw capability. GCP's reputation is data and analytics (BigQuery), Kubernetes (Google created it, and GKE is its managed offering), and a cleaner project-based resource model. AWS has the widest service catalog and the largest market share. Azure leads where an organization already runs Microsoft and Active Directory. Knowing where each fits, and saying the trade-off out loud instead of claiming one is universally best, is itself an interview signal.

AreaGCPAWSAzure
Data warehouseBigQuery, serverless and often the differentiatorRedshiftSynapse
Managed KubernetesGKE, from the team that built KubernetesEKSAKS
Serverless containersCloud Run, request-based and simpleApp Runner / FargateContainer Apps
Resource groupingProjects under folders and an orgAccounts under OrganizationsSubscriptions and resource groups
Common strengthData, analytics, Kubernetes, networkingBreadth of services, market shareMicrosoft and enterprise integration

How to Prepare for a GCP Interview

Prepare in layers, and trade-offs out loud is the explanation path. Most GCP rounds move from concept questions to a hands-on or scenario task to a design discussion, so rehearse each stage rather than only reading answers.

  • Master your tier's concepts until you can explain them without notes, then read one tier up for the stretch questions.
  • Get a free-tier GCP account and run the gcloud commands; provisioning a VM, a bucket, and a small GKE cluster cements the ideas far faster than reading.
  • Rehearse scenario answers with a structure: clarify, pick a service, The trade-off, and describe how you'd control cost and access.
  • Take the quiz on this page to find weak spots, then revisit those questions before the real round.

The typical GCP interview flow

1Recruiter or phone screen
background, GCP services you've used, a few concept checks
2Technical concepts
IAM, projects, compute options, storage, networking, BigQuery
3Hands-on or scenario
pick services for a workload, debug an access or deploy issue
4Design and cost
architect a system on GCP, discuss reliability, security, and billing

Earlier rounds increasingly run as AI-driven technical interviews. The concepts on this page are what gets probed at every stage.

Test Yourself: GCP Quiz

Ready to test your GCP knowledge?

10 questions, about 6 minutes. Score 70% or higher to earn a shareable certificate.

10 questions Instant feedback Free certificate on 70%+

Frequently  Asked  Questions

Which GCP topics should I prioritize before a technical round?

Prioritize the areas that change real decisions: fundamentals, practical tasks, debugging, trade-offs, and evidence. The highest-value questions are tied to a project example, a validation check, or a failure mode.

Do I need a GCP certification to pass the interview?

A certification helps you get the interview and structures your study, but it doesn't replace hands-on judgment. Interviewers ask why you'd pick Cloud Run over GKE, or how you'd scope a service account, and those need real reasoning. Study for the Associate Cloud Engineer content if you want a map, but build things alongside it.

Which services do these answers focus on?

The ones that come up most: IAM and the resource hierarchy, Compute Engine, GKE, Cloud Run and Cloud Functions, Cloud Storage, VPC networking, and BigQuery. If your target role leans data, expect more BigQuery and Dataflow; if it leans platform, expect more GKE and networking. The service you'd map each concept to.

How long does it take to prepare for a GCP interview?

If you use GCP at work, one to two weeks of an hour a day covers this bank with practice runs. Starting colder, plan three to four weeks and build things daily: deploy an app to Cloud Run, spin up a GKE cluster, query a public dataset in BigQuery. Reading answers without touching the console is how preparation quietly fails.

Do interviewers ask exactly these questions?

The concepts repeat far more reliably than the exact wording. Interviewers rephrase, chain follow-ups, and push toward whatever you claim confidence in. Prepare the underlying ideas, IAM, compute choices, networking, storage classes, BigQuery, and the phrasing takes care of itself.

Is there a way to test my GCP knowledge?

Yes. The quiz on this page scores you as you go and explains every answer, so you find your weak spots fast. Pass the threshold and you can download a shareable certificate with your name and score, free and with no sign-up. It's the quickest way to check yourself before the real round.

From the team that builds coding interviews

Hyring builds the AI Coding Interviewer that runs live technical rounds in 20+ languages for 5,000+ hiring teams. These GCP questions and scoring notes reflect what actually gets asked and evaluated inside the interviews we host.

See how the AI Coding Interviewer works

Sources

Adithyan RKWritten by Adithyan RK
Surya N
Fact-checked by Surya N
Published on: 9 Jun 2026Last updated: 21 Jun 2026
Share: