Google Cloud (GCP) Interview Questions and Answers
Last updated 2026-11-19
Google Cloud interviews lean on a few distinctive ideas: the project as the unit of organisation, a global VPC, serverless containers on Cloud Run, managed Kubernetes on GKE and the BigQuery analytics model. If you already know AWS or Azure, the fastest route is to learn where GCP behaves differently and be able to say why. This page has 14 worked questions with gcloud, bq and IAM examples.
Service names and defaults evolve, so verify details against the current Google Cloud documentation before quoting limits. For comparison see the AWS questions and Azure questions; for container topics, the Kubernetes questions.
| Organisation | Organisation, folders, projects, resources |
|---|---|
| Signature services | BigQuery, GKE, Cloud Run, Pub/Sub, Spanner, Cloud Storage |
| Certifications | Cloud Digital Leader, Associate Cloud Engineer, Professional Cloud Architect |
How GCP differs in structure
Every resource lives in a project, which carries billing, APIs, IAM policy and quotas. Projects sit in folders under an organisation node, and IAM policies and organisation policies inherit downwards. APIs must be enabled per project before use, which surprises newcomers when a first command fails with a permission-denied or service-disabled error. VPC networks are global resources with regional subnets, so a single network spans regions without peering, unlike AWS.
Keep this in mind for design questions: isolation boundaries are mostly projects and VPC Service Controls, not account-level separations.
Google Cloud (GCP) Interview Questions and Answers: questions with worked answers
1 Explain the GCP resource hierarchy and why projects matter.
easyThe hierarchy is organisation, folders, projects, then resources. A project is the base unit for enabling APIs, attaching a billing account, applying IAM and tracking quotas and logs. Inheritance flows downwards: a role granted at a folder applies to every project under it, and organisation policy constraints such as restricting regions or disabling external IPs cascade the same way. Teams commonly separate projects by environment and application, for example one project for production and another for staging, which gives clean blast-radius control and per-project cost reporting through labels and billing exports.
2 How does IAM work in Google Cloud? Distinguish basic, predefined and custom roles.
mediumIAM binds a principal (user, group, service account or workload identity) to a role on a resource, and policies inherit down the hierarchy. Basic roles Owner, Editor and Viewer are very broad and should be avoided in production. Predefined roles, such as roles/storage.objectViewer, are curated per service and are the usual choice. Custom roles let you pick exact permissions when no predefined role fits, at a maintenance cost. IAM also supports deny policies and conditions, for example expiring access. Grant to groups, and apply the principle of least privilege.
bashgcloud projects add-iam-policy-binding my-proj \ --member="serviceAccount:reports@my-proj.iam.gserviceaccount.com" \ --role="roles/storage.objectViewer" gcloud projects get-iam-policy my-proj --format=json | head -403 What are service accounts, and how should workloads authenticate without key files?
mediumA service account is an identity for an application rather than a person. Downloadable JSON keys are long-lived credentials that leak easily, so avoid them. Attach a service account to the resource instead: Compute Engine, Cloud Run and GKE nodes get tokens from the metadata server, and client libraries pick them up through Application Default Credentials. On GKE use Workload Identity Federation so a Kubernetes service account maps to a Google service account. For CI systems outside GCP use workload identity federation with OIDC to exchange the CI token for short-lived credentials. Give each workload its own service account with minimal roles.
4 What does it mean that a GCP VPC is global? How do firewall rules work?
mediumA VPC network is a global construct: its subnets are regional, but instances in different regions of the same VPC can reach each other by internal IP with no peering or gateway. Firewall rules are stateful, defined at the VPC level and applied to instances using network tags or service accounts as targets, with priorities from 0 to 65535 where lower numbers win. There is an implied deny-all ingress and allow-all egress. Use service-account-based targeting rather than tags where possible, because tags can be set by anyone with edit rights on the instance. Cloud NAT provides outbound internet for instances without external IPs.
bashgcloud compute networks create prod-vpc --subnet-mode=custom gcloud compute networks subnets create app-asia --network=prod-vpc --region=asia-south1 --range=10.10.0.0/24 gcloud compute firewall-rules create allow-https --network=prod-vpc --allow=tcp:443 --target-tags=web --source-ranges=0.0.0.0/05 Compare Compute Engine, GKE, Cloud Run, App Engine and Cloud Functions.
mediumCompute Engine gives virtual machines with full control. GKE is managed Kubernetes, in Standard mode where you manage node pools or Autopilot where Google manages nodes and bills by pod resources. Cloud Run runs stateless containers that scale to zero, handles HTTP and event triggers and charges for request time, making it the simplest path to deploy a container. App Engine is the older platform-as-a-service with standard and flexible environments. Cloud Run functions (previously Cloud Functions) run single-purpose event-driven code. Choose Cloud Run unless you need Kubernetes features, custom node hardware or non-HTTP long-lived workloads.
6 Deploy a container to Cloud Run and explain concurrency and cold starts.
mediumCloud Run builds a revision for each deployment and splits traffic between revisions, so canary and rollback are traffic percentages. Unlike a typical function-per-request model, one instance handles many concurrent requests (default 80, configurable up to 1000), which reduces cold starts and cost for IO-bound apps; set concurrency to 1 for code that is not thread-safe. Cold starts happen when scaling from zero, and you reduce them with a minimum instances setting, smaller images and lazy initialisation. The container must listen on the port given in the PORT environment variable.
bashgcloud run deploy api --image=asia-south1-docker.pkg.dev/my-proj/apps/api:1.0.3 \ --region=asia-south1 --min-instances=1 --concurrency=80 --no-allow-unauthenticated gcloud run services update-traffic api --region=asia-south1 --to-revisions=api-00007-abc=10,LATEST=907 What are the GKE Standard and Autopilot modes, and what is a private cluster?
mediumIn Standard you choose machine types, node pools, upgrades and autoscaling, and pay for nodes. In Autopilot Google provisions and manages nodes, enforces security best practices, and bills for the CPU, memory and storage your pods request, which cuts operations work but restricts some node-level customisation. A private cluster gives nodes only internal IPs, so they are not reachable from the internet; the control plane endpoint can be limited to authorised networks. Pair private nodes with Cloud NAT for pulling images, enable Workload Identity, use release channels for managed upgrades and use Binary Authorization to restrict images to signed ones.
8 What makes BigQuery different from a traditional data warehouse?
mediumBigQuery is serverless and separates storage from compute: data sits in a columnar format, and queries run on shared slots, so you never size clusters. You are billed either on bytes scanned (on-demand) or on reserved slot capacity. Because it is columnar and charges per bytes read, selecting only needed columns and filtering on a partition column cut cost directly. Partition tables by date or integer range, and cluster by commonly filtered columns to prune data. It supports nested and repeated fields rather than forcing normalisation, and it is built for analytics rather than low-latency single-row transactions.
sqlCREATE TABLE analytics.events PARTITION BY DATE(event_ts) CLUSTER BY user_id AS SELECT * FROM staging.events_raw; -- scans only one day's partition and two columns SELECT user_id, COUNT(*) AS n FROM analytics.events WHERE DATE(event_ts) = '2026-11-18' GROUP BY user_id;9 How do you control and estimate BigQuery cost?
mediumUse a dry run to see bytes processed before running a query, set maximum bytes billed per query so a mistake fails instead of costing money, and set project-level or user-level quotas. Avoid SELECT star on wide tables, partition and cluster, require a partition filter on large tables, and materialise repeated expensive transformations into tables or materialized views. For predictable heavy workloads move from on-demand pricing to slot reservations. Remember that LIMIT does not reduce bytes scanned in a plain table scan.
bashbq query --use_legacy_sql=false --dry_run 'SELECT user_id FROM analytics.events WHERE DATE(event_ts)="2026-11-18"' bq query --use_legacy_sql=false --maximum_bytes_billed=1000000000 'SELECT COUNT(*) FROM analytics.events'10 Cloud Storage classes and access control: what should you know?
easyStorage classes are Standard, Nearline, Coldline and Archive, ordered by decreasing storage cost and increasing retrieval cost and minimum storage duration (30, 90 and 365 days for the last three), and all offer millisecond access to data. Location types are regional, dual-region and multi-region. Use Autoclass or lifecycle rules to transition objects. For access, enable uniform bucket-level access so IAM alone controls permissions instead of per-object ACLs, enforce public access prevention, and use signed URLs for temporary sharing. Turn on object versioning and retention policies for protection against deletion.
11 Describe Pub/Sub and its delivery semantics.
mediumPub/Sub is a global, managed messaging service: publishers send messages to a topic and subscriptions deliver them to subscribers by pull, push to an HTTPS endpoint, or direct export to BigQuery or Cloud Storage. Delivery is at-least-once by default, so consumers must be idempotent; exactly-once delivery is available on pull subscriptions in a region but has limits. Ordering keys give per-key ordering. Unacknowledged messages are redelivered after the ack deadline, and dead-letter topics capture messages that fail repeatedly. Retention lets you replay by seeking a subscription to a timestamp.
12 When would you choose Cloud SQL, Spanner, Firestore or Bigtable?
mediumCloud SQL is managed MySQL, PostgreSQL or SQL Server for conventional relational apps that fit on one primary with replicas. Spanner is a horizontally scalable relational database with strong consistency across regions, for global transactional systems that outgrow a single instance, at a higher cost. Firestore is a serverless document database with real-time sync for mobile and web apps. Bigtable is a wide-column NoSQL store for very high write throughput and low latency over huge time-series or IoT datasets, accessed by row key with no joins. BigQuery covers analytical queries instead.
13 What are VPC Service Controls and Private Google Access?
hardPrivate Google Access lets VMs without external IPs reach Google APIs over internal routes. VPC Service Controls go further: they define a security perimeter around projects and services such as BigQuery and Cloud Storage so data cannot be exfiltrated to resources outside the perimeter, even by someone holding valid IAM credentials. Access from outside is permitted only through explicit ingress rules or access levels. They address the risk of stolen credentials or a compromised insider copying data to a personal project, and are usually rolled out in dry-run mode first to see what would break.
14 How do you get logs and metrics for an application on GCP?
mediumCloud Logging collects platform and application logs automatically for Cloud Run, GKE and App Engine, and through the Ops Agent on Compute Engine. Structured JSON written to stdout becomes searchable fields, and log-based metrics turn log patterns into metrics. Cloud Monitoring holds metrics, dashboards, uptime checks and alerting policies, and Cloud Trace and Error Reporting cover latency and exceptions. Route logs with sinks to BigQuery, Cloud Storage or Pub/Sub for long-term analysis or SIEM export. Define service level objectives in Monitoring to alert on error budget burn rate.
15 Write the gcloud commands to create a VM and connect to it without opening SSH to the internet.
hardCreate the instance without an external IP, then connect through Identity-Aware Proxy TCP forwarding, which authenticates with IAM and tunnels SSH through Google's front end, so no inbound port is open to the world. You need the firewall to allow the IAP range 35.235.240.0/20 on port 22 and the roles/iap.tunnelResourceAccessor role for the user. OS Login ties SSH access to IAM instead of copying keys into metadata.
bashgcloud compute instances create app-1 --zone=asia-south1-a --machine-type=e2-medium \ --subnet=app-asia --no-address --metadata=enable-oslogin=TRUE gcloud compute firewall-rules create allow-iap-ssh --network=prod-vpc \ --allow=tcp:22 --source-ranges=35.235.240.0/20 gcloud compute ssh app-1 --zone=asia-south1-a --tunnel-through-iap
Frequently asked questions
Is GCP in demand in India compared with AWS and Azure?
AWS and Azure have the larger share of job listings, but GCP is common in data, analytics and Kubernetes-heavy companies. Knowing one cloud deeply and the others at concept level is a strong position.
What is the equivalent of an AWS VPC in Google Cloud?
A VPC network, but it is global with regional subnets, and firewall rules are applied at the network level using tags or service accounts rather than per-instance security groups.
Which GCP certification is best for beginners?
Associate Cloud Engineer is the practical starting point, covering projects, IAM, compute, networking and operations, while Cloud Digital Leader is a non-technical overview.
Can I practise GCP for free?
Google Cloud has a free tier with limited always-free usage and sometimes new-customer credits, and terms change, so check the current offer and set budget alerts before creating resources.
Related guides
More in Role-wise Interview Questions by Job and Tech Stack
- GraphQL Interview Questions and Answers
- Hibernate and JPA Interview Questions and Answers
- HTML and CSS Interview Questions and Answers
- iOS and Swift Interview Questions and Answers
- Jenkins and CI/CD Interview Questions and Answers
- Kubernetes Interview Questions and Answers
- Machine Learning Interview Questions and Answers
- Manual Testing Interview Questions and Answers
- MERN Stack Interview Questions and Answers
- Next.js Interview Questions and Answers (Next.js 15)
- NLP Interview Questions and Answers
- Node.js Interview Questions and Answers (Node 22)