Skip to content

GCP Engineer interview questions

100 real questions with model answers and explanations for Senior Cloud Engineer candidates.

See a GCP Engineer resume example

Practice with flashcards

Spaced repetition · Hunter Pass

Questions

kubernetes

I would start with Autopilot because the workloads fit its managed operating model and do not need node-level control.

  • Google manages nodes, scaling, and many security defaults, but I would still validate required DaemonSets and admission policies against Autopilot restrictions.
  • General-purpose workloads on the default Autopilot platform or Balanced and Scale-Out ComputeClasses use Pod-based billing from resource requests, so I would right-size those requests.
  • Workloads that select specific machine series or accelerators use node-based billing for whole nodes plus an Autopilot management premium.
  • I would choose Standard for privileged host access, specialized node configuration, or tighter control over upgrade timing.

Why interviewers ask this: The interviewer is evaluating whether the candidate chooses a GKE mode from workload constraints and operating cost rather than treating Autopilot as universally better.

configkubernetes

I would use a regional GKE cluster with worker nodes spread across at least three zones.

  • The control plane is replicated across zones, so a single zonal failure does not remove Kubernetes API availability.
  • I would size node pools so the remaining zones can run critical requests after one zone is unavailable.
  • Regional node counts and quotas can multiply across zones, so I would verify the actual total nodes and cost before creation.
  • Workloads would also use topology spread constraints and replicated storage that matches the availability requirement.

Why interviewers ask this: The interviewer wants to see that the candidate covers both control-plane availability and workload capacity instead of assuming a regional cluster solves everything.

system-designdesignbatch

I would separate these workload classes into node pools with explicit labels, taints, and tolerations.

  • A small on-demand system pool would host DNS, metrics, and controllers so batch pressure cannot evict cluster services.
  • Regular APIs would use a general-purpose on-demand pool sized for their CPU and memory profile.
  • Batch jobs would tolerate a Spot VM pool and handle termination, gaining lower cost without weakening API availability.
  • Each pool would have independent autoscaling bounds, upgrade settings, and machine types so one policy does not fit every workload.

Why interviewers ask this: The interviewer is checking whether the candidate uses node pools to isolate cost, reliability, and hardware requirements in a practical cluster.

kubernetesapimemory

I would derive initial requests from load tests and observed percentiles, then refine them with production metrics.

  • Requests must cover normal CPU and memory use because the scheduler and cluster autoscaler make placement decisions from them.
  • I would set a memory limit above the working set to contain leaks, knowing that crossing it causes an OOM kill.
  • I would avoid a tight CPU limit for a latency-sensitive API because CFS throttling can hurt response time even when nodes have spare CPU.
  • I would alert on throttling, OOM kills, and the request-to-usage ratio before changing values.

Why interviewers ask this: The interviewer is testing whether the candidate understands how resource settings affect scheduling, cost, throttling, and autoscaling.

httpdata-structures

I would let HPA change replica count from traffic signals and use VPA initially in recommendation mode for right-sizing.

  • HPA could target CPU utilization plus an external queue-depth metric so it reacts before requests accumulate.
  • CPU percentage is measured against CPU requests, so unrealistic requests would also make HPA behavior unrealistic.
  • I would not let VPA automatically change the same CPU or memory resource that HPA uses, because the two control loops can fight.
  • After observing recommendations, I would update requests through deployment changes or use VPA only for a resource that HPA does not target.

Why interviewers ask this: The interviewer is evaluating whether the candidate can combine pod autoscalers without creating conflicting control loops.

configkubernetesreplication

I would set per-pool minimum and maximum nodes from failure capacity, quotas, and the largest pod shape.

  • Cluster autoscaler adds nodes only when pods are unschedulable from their requests, not merely when average node CPU is high.
  • The pool must offer a machine type that fits the largest pod, or replicas can remain pending even below the maximum node count.
  • I would keep a small amount of headroom or use overprovisioning pods when node startup latency is too slow for the burst.
  • Scale-down settings must respect PDBs and long-running jobs so savings do not cause avoidable disruption.

Why interviewers ask this: The interviewer is checking whether the candidate understands the scheduling signal and capacity constraints behind cluster autoscaling.

kubernetesreplication

I would combine a PodDisruptionBudget with topology spread constraints across zones and nodes.

  • A PDB with maxUnavailable: 1 preserves two replicas during voluntary disruptions such as node drains.
  • A zone constraint with maxSkew: 1 prevents all replicas from landing in one failure domain.
  • A hostname constraint reduces the chance that two replicas share the same node.
  • I would verify there is spare capacity, because a strict PDB protects availability but can block a drain when replacement pods cannot schedule.

Why interviewers ask this: The interviewer is testing whether the candidate distinguishes disruption protection from actual replica placement and capacity.

kubernetesidentityobject-storage

I would use Workload Identity Federation for GKE and bind the Kubernetes workload to a least-privileged IAM identity.

  • The pod receives short-lived credentials through the GKE metadata path instead of mounting a JSON key.
  • I would grant only objectViewer on the required bucket, not a project-wide storage role.
  • The Kubernetes namespace and service account would be dedicated to that workload to keep the principal boundary clear.
  • I would test the binding from the pod and ensure legacy metadata access or key secrets are not left as fallback credentials.

Why interviewers ask this: The interviewer wants evidence that the candidate can implement keyless, workload-scoped GCP authentication in GKE.

kubernetessqlapi

I would apply default-deny ingress and egress NetworkPolicies, then add narrow allow policies for those paths.

  • Pod and namespace labels would select the API and internal service rather than relying on changing pod IP addresses.
  • A specific egress rule would allow kube-dns on UDP and TCP 53 so name resolution still works.
  • Cloud SQL access would be limited to the connector or private endpoint path and required port.
  • I would use GKE Dataplane V2 enforcement and remember that VPC firewall rules still govern traffic outside the cluster.

Why interviewers ask this: The interviewer is evaluating whether the candidate can build a usable allowlist and understands the boundary between Kubernetes and VPC controls.

kuberneteshttpapi

I would choose Gateway API because it separates load-balancer ownership from per-application routing more cleanly.

  • The platform team can own Gateway and TLS policy while application teams attach namespace-scoped HTTPRoutes.
  • Route attachment rules make cross-namespace delegation explicit instead of sharing one large Ingress object.
  • I would still use GKE Ingress for a simple existing application whose supported annotations already meet every requirement.
  • Before migration I would compare the exact GKE GatewayClass features, certificates, redirects, and backend policies we need.

Why interviewers ask this: The interviewer is checking whether the candidate selects an L7 API from ownership and feature requirements rather than novelty.

deploymentartifactsregistries

I would promote one immutable image digest through environments instead of rebuilding per environment.

  • Cloud Build would push to a regional Docker repository near the runtimes and record the sha256 digest.
  • Deployment manifests would reference that digest, so moving a tag cannot silently change production.
  • Writer access would belong only to build identities, while runtime identities receive repository reader access.
  • Cleanup policies would retain released and recently used images while deleting old untagged build artifacts.

Why interviewers ask this: The interviewer is evaluating whether the candidate designs artifact promotion for provenance, least privilege, and controlled storage growth.

deploymentci-cdkubernetes

I would enforce Binary Authorization with attestations produced only after the approved build and security checks pass.

  • The pipeline would sign the image digest, not a mutable tag, using a protected attestor key.
  • The production policy would require that attestation and allow only explicitly approved registries.
  • I would first run the policy in audit mode to identify system images and legitimate exceptions before enforcement.
  • Break-glass deployment would require a controlled reason, narrow IAM access, and an audit review rather than a permanent bypass.

Why interviewers ask this: The interviewer is testing whether the candidate can turn container provenance into an enforceable deployment control with a safe rollout.

deploymenthelmkubernetes

I would use Helm for reusable application packaging and Kustomize for small environment overlays when both add clear value.

  • A Helm chart fits repeated objects, optional components, and versioned releases consumed by several teams.
  • Kustomize fits patches such as replica counts, project names, and Gateway references without turning every field into a template value.
  • If the application is simple, I would choose one tool because layered rendering makes the final manifest harder to review.
  • CI would render every environment and validate the resulting YAML before Argo CD or Cloud Deploy receives it.

Why interviewers ask this: The interviewer wants to see a maintainable configuration choice rather than automatic tool stacking.

designnetworkingci-cd

I would use a regional Cloud Build private pool connected to the VPC that hosts the private dependencies.

  • The pool's network path and firewall rules would allow only the repository, package mirror, Artifact Registry, and required Google APIs.
  • If public dependencies are required, I would mirror them or use an approved proxy because disabling worker external IPs removes direct internet access.
  • The build service account would have narrow artifact and logging roles, with no broad project Editor permission.
  • I would size worker machines and pool concurrency from measured build demand because private pool capacity has direct cost.

Why interviewers ask this: The interviewer is evaluating whether the candidate understands private build connectivity, identity, egress, and capacity trade-offs.

deploymentkubernetesapi

I would define a Cloud Deploy delivery pipeline with a canary strategy and explicit approval before full rollout.

  • Skaffold would render the same release artifact for the target, avoiding a rebuild between percentages.
  • The canary phases would shift 10%, then 30%, then 100% through supported GKE service networking.
  • Verification jobs would compare error rate and latency against the stable version at each phase.
  • A verification failure stops advancement but does not itself restore stable traffic, so I would trigger an explicit rollback or configure Cloud Deploy repair automation to do so under defined criteria.

Why interviewers ask this: The interviewer is checking whether the candidate can describe controlled progressive delivery rather than merely naming canary deployment.

gitgitopskubernetes

I would make Git the desired-state source and give Argo CD only the cluster permissions needed for its assigned namespaces.

  • Separate Argo CD projects would restrict allowed repositories, destinations, namespaces, and resource kinds for each team.
  • Protected branches and reviewed pull requests would gate production changes before reconciliation.
  • Auto-sync could handle low-risk environments, while production uses sync windows or explicit promotion according to policy.
  • Drift would be visible in Argo CD, and emergency manual changes would either be reverted or immediately captured back in Git.

Why interviewers ask this: The interviewer is evaluating practical GitOps access control and change ownership, not just reconciliation mechanics.

containersconfigkubernetes

I would keep environment configuration outside the image and render versioned ConfigMaps through the deployment pipeline.

  • The same image digest would move through dev and production while overlays supply endpoints, flags, and resource settings.
  • A checksum of the ConfigMap would be placed on the pod template so a changed config triggers a controlled rollout.
  • Large or frequently changing configuration would use a dedicated configuration service or mounted file rather than hundreds of environment variables.
  • Schema validation in CI would reject missing keys and invalid values before Kubernetes accepts the manifest.

Why interviewers ask this: The interviewer is checking whether the candidate separates build artifacts from environment configuration and makes changes safely observable.

secretspasswordskubernetes

I would use the Secret Manager add-on or CSI driver with Workload Identity Federation for GKE and never store the password in Git.

  • I would grant roles/secretmanager.secretAccessor to the workload principal on the secret resource because IAM access is not granted on an individual secret version.
  • The SecretProviderClass or add-on configuration would reference an explicit resource version such as versions/7 instead of latest, making the consumed value deterministic.
  • Rotation would create the new database credential and secret version, update that pinned reference, roll and verify consumers, and only then retire the old credential and version.
  • Secret Manager Data Access logs would confirm which principal read the value during the change.

Why interviewers ask this: The interviewer is evaluating end-to-end secret delivery, least privilege, and rotation rather than simple secret storage.

networking

I would place the VPC, subnets, routes, and central firewall controls in a host project and attach the three service projects.

  • Application resources stay in service projects for billing and IAM separation while using host-project subnets.
  • Network administrators manage the host, and application deployers receive only subnet-level Network User access where needed.
  • I would allocate non-overlapping regional CIDR ranges with room for GKE pods, services, and future growth.
  • Central ownership would not replace service-project IAM, so resource and network permissions remain separate responsibilities.

Why interviewers ask this: The interviewer is checking whether the candidate understands Shared VPC ownership, delegated use, and address planning.

networkingssh

I would enforce the broad deny at the folder level and add a narrow higher-priority allowance for the approved administration path.

  • The allow rule would target secured resources with service accounts or secure tags instead of a wide network CIDR.
  • SSH from 0.0.0.0/0 would be denied centrally so project owners cannot override the guardrail with a lower-level VPC rule.
  • Rule priorities and inheritance would be documented because a higher-level match can prevent child policies from taking effect.
  • I would test policy impact on a non-production project before applying it to the full folder.

Why interviewers ask this: The interviewer is evaluating whether the candidate can apply inherited network guardrails without removing legitimate delegated access.

Locked questions

  • 21

    Private VMs without external IPs must call Cloud Storage and Artifact Registry. What network path would you configure?

    configartifactsregistries
  • 22

    A consumer VPC must call a managed service in a producer VPC without peering the two networks. How would you use Private Service Connect?

    networkingprivate-connectivity
  • 23

    A private GKE node pool opens many short-lived outbound connections. How would you size Cloud NAT?

    networkingkubernetes
  • 24

    A company needs 2 Gbps hybrid connectivity now and expects 10 Gbps next year. How would you choose between HA VPN and Cloud Interconnect?

    hybrid-networking
  • 25

    Two VPCs need to resolve a private zone owned by a central DNS VPC. How would you design Cloud DNS peering?

    designdnsnetworking
  • 26

    How would you advertise GCP subnets to two on-premises routers while preferring one hybrid path and retaining failover?

    networking
  • 27

    Which Google Cloud load balancers would you choose for a public HTTPS API, a private HTTP service, and a UDP game endpoint?

    httphttpsendpoints
  • 28

    A deployment service needs 14 permissions but no predefined IAM role matches. How would you create and maintain a custom role?

    deployment
  • 29

    How would you let contractors administer test resources only until a fixed date while preserving audit logs even if a project administrator becomes malicious?

  • 30

    GitHub Actions must deploy to GCP without a service account key, and engineers occasionally need the same deployment identity. How would you configure access?

    ci-cddeploymentconfig
  • 31

    A team says VPC Service Controls will replace IAM and firewall rules around BigQuery and Cloud Storage. How would you correct the design?

    designnetworkingobject-storage
  • 32

    A public application behind a Google Cloud Application Load Balancer needs WAF protection and login rate limiting. How would you configure Cloud Armor?

    load-balancingrate-limitingconfig
  • 33

    How would you expose an internal administration web app to employees without giving its VMs public IP addresses or opening a VPN to everyone?

  • 34

    How would you introduce Security Command Center for a folder containing 20 GCP projects without overwhelming teams with findings?

  • 35

    How would you design Terraform modules for repeated GCP projects without creating one giant platform module?

    terraformdesign
  • 36

    A company has dev, staging, and production Terraform stacks. How would you isolate their state?

    terraform
  • 37

    You must bring an existing VPC under Terraform and then rename its resource address without recreation. What steps would you take?

    networkingterraform
  • 38

    How would you pin Terraform and Google provider versions while still receiving fixes?

    terraform
  • 39

    What checks would you require in CI before applying a Terraform change to a production GCP project?

    terraform
  • 40

    When would you use Google Cloud Infrastructure Manager for a new Terraform-based environment?

    terraform
  • 41

    A legacy project still has resources created by Deployment Manager. What migration path would you propose in 2026?

    migrationsdeployment
  • 42

    A Cloud Run service needs private access to Cloud SQL and an internal HTTP service. How would you configure Direct VPC egress?

    networkingserverless-containerssql
  • 43

    A latency-sensitive Cloud Run API receives 40 requests per second and each request uses significant CPU. How would you tune minimum instances and concurrency?

    serverless-containersapilatency
  • 44

    Would you use a Pub/Sub push or pull subscription for image jobs that take 5 to 90 seconds, and how would you prevent duplicate processing?

    messagingconcurrency
  • 45

    How would you trigger a Cloud Run thumbnail service whenever an object is finalized in one Cloud Storage bucket?

    object-storageserverless-containers
  • 46

    A team must aggregate Pub/Sub events into five-minute BigQuery metrics with late data. When is Dataflow a good fit?

    aggregationbigquerymonitoring
  • 47

    How would you design Cloud SQL for a regional web API that needs high availability, 400 application connections, and read-heavy reports?

    sqlapidesign
  • 48

    A Spanner table receives 20,000 writes per second with sequential order numbers. How would you choose its primary key?

    primary-keys
  • 49

    A 30 TB BigQuery events table is queried by event date, customer ID, and event type. How would you control scan cost and slot capacity?

    bigquerycapacity
  • 50

    A Cloud Storage bucket keeps user uploads for years, but access frequency is unknown. Would you use lifecycle rules or Autoclass?

    object-storage
  • 51

    A new GKE pod stays Pending even though the cluster has free CPU and memory. How would you diagnose taints and affinity?

    kubernetesmemory
  • 52

    A CPU-heavy GKE deployment is overloaded, but its HPA keeps the same replica count. What would you check?

    deploymentkubernetesreplication
  • 53

    GKE cluster autoscaling leaves one node underused while some replicas remain Pending. How would PDBs and topology constraints affect your diagnosis?

    kubernetesreplicationscaling
  • 54

    A GKE Deployment rollout is stuck with new pods Running but not Ready. How would you debug it?

    deploymentkubernetesproblem-solving
  • 55

    Several GKE pods were evicted after a node reported memory pressure. How would you investigate and prevent a repeat?

    kubernetesmemory
  • 56

    Pods in one GKE node pool intermittently fail DNS lookups while other pods work. How would you narrow down the fault?

    kubernetesdns
  • 57

    A GKE service lost access to one dependency immediately after a default-deny NetworkPolicy was deployed. How would you debug it?

    deploymentdependencieskubernetes
  • 58

    A GKE service exposed through Gateway API or Ingress returns 502 after a release, while direct pod requests succeed. What would you inspect?

    kubernetesapigateway-api
  • 59

    A pod using Workload Identity Federation for GKE receives 403 from Cloud Storage. How would you find the missing permission?

    kubernetesidentityobject-storage
  • 60

    A workload accepted by GKE Standard is rejected by Autopilot admission. How would you handle the migration?

    kubernetesmigrations
  • 61

    Binary Authorization rejects a GKE deployment whose image exists in Artifact Registry. What would you check?

    deploymentartifactsregistries
  • 62

    Argo CD continuously reports drift and reverts a field changed by another controller. How would you resolve ownership?

    iacgitopsownership
  • 63

    A Cloud Deploy canary at 30% traffic shows a sharp error increase. How would you roll it back safely?

    deploymentdeployment-strategies
  • 64

    The remote GCS state is valid and unlocked, but a Terraform apply failed after creating only part of the planned infrastructure. How would you recover?

    terraform
  • 65

    The Google Terraform provider times out while creating a regional GKE cluster, but the GCP operation is still running. How would you recover the partial apply?

    terraformkubernetes
  • 66

    A Google Terraform provider upgrade suddenly proposes replacements and changes IAM behavior. How would you investigate the regression?

    terraform
  • 67

    A platform team must apply the same labels and API enablement to 80 GCP projects. How would you structure reusable Go or Python automation instead of a one-off script?

    python
  • 68

    A deployment in a Shared VPC service project fails with permission denied when selecting a host-project subnet. How would you fix it?

    networkingdeployment
  • 69

    An API runs in two GKE clusters, but a cluster outage leaves external clients and in-cluster callers on the failed cluster. How would you design and test failover and service discovery?

    kubernetesapidesign
  • 70

    Both HA VPN tunnels appear up, but GCP suddenly loses an on-premises prefix. How would you debug Cloud Router and BGP?

  • 71

    A Private Service Connect endpoint remains REJECTED when a consumer project connects to a producer service. What would you inspect?

    private-connectivityendpoints
  • 72

    A BigQuery job works under a VPC Service Controls dry-run perimeter but is denied after enforcement. How would you diagnose it?

    bigquerynetworking
  • 73

    Cloud Armor begins blocking legitimate checkout requests after a managed WAF rule is enabled. How would you tune the false positive?

  • 74

    An employee receives 403 from an application protected by IAP while coworkers can enter. What would you check?

  • 75

    A Cloud Run service returns an HTTP response and then continues CPU-heavy work in the background, but that work stalls or disappears. How would you configure and redesign it?

    serverless-containershttpconfig
  • 76

    A Cloud Run service using Direct VPC egress resolves an internal hostname but cannot reach its on-premises IP. How would you debug it?

    networkingserverless-containers
  • 77

    A custom CloudEvent routed through Eventarc needs a schema change while several Cloud Run consumers deploy independently. How would you evolve the event contract?

    serverless-containerseventsschema
  • 78

    A Pub/Sub subscription has nine million messages backlogged, publishers send 8,000 per second, and one worker handles 40 per second. How would you size recovery?

    backlogmessaging
  • 79

    A team enables Pub/Sub exactly-once delivery and plans active pull subscribers in two regions. What limitation would you raise?

    messaging
  • 80

    A Dataflow streaming job's watermark stops advancing and many records become late. How would you investigate?

    streaming
  • 81

    Cloud SQL starts rejecting connections after a Cloud Run deployment scales out. How would you stabilize it?

    sqldeploymentserverless-containers
  • 82

    A Cloud SQL read replica falls minutes behind during a reporting window. What would you check and change?

    sqlreplication
  • 83

    How would you validate a Cloud SQL regional HA failover before a production launch?

    sqlvalidation
  • 84

    A Spanner order-history query slows from 90 ms to 1.2 seconds after the table reaches 2 TB, while writes remain healthy; how would you diagnose and tune it?

    queries
  • 85

    A BigQuery join scans the expected partitions, but one execution stage dominates slot time and spills a large shuffle. How would you diagnose and fix skew?

    joinspartitioningbigquery
  • 86

    Scheduled ETL makes interactive BigQuery dashboards wait for slots every morning. How would you reduce the contention?

    bigqueryetl
  • 87

    A Cloud Storage object was overwritten, and the bucket has retention controls and Object Versioning. How would you restore it?

    retentionversioningobject-storage
  • 88

    Creating a CMEK-protected GCP resource fails with a Cloud KMS permission error. How would you troubleshoot it?

  • 89

    Cloud Logging storage volume and cost doubled after a release. How would you find and reduce the noisy source?

    logging
  • 90

    A custom Cloud Monitoring metric suddenly creates hundreds of thousands of time series. How would you control cardinality?

    monitoring
  • 91

    How would you build a multi-window burn-rate alert for a service with a 99.9% availability SLO over 30 days?

    sloalerting
  • 92

    Trace volume is too expensive, but rare p99 failures must remain debuggable. How would you change sampling?

    sampling
  • 93

    One GCP project's daily cost jumps 40% overnight. What investigation would you run first?

  • 94

    A workload has a stable 60% compute baseline and interruptible nightly batch spikes. How would you choose rightsizing, CUDs, and Spot VMs?

    spotbatchfinops
  • 95

    Cloud Service Mesh shows healthy mTLS on a GKE call, but one service account now receives HTTP 403 after an AuthorizationPolicy change; how would you diagnose it?

    authmtlsidentity
  • 96

    A release policy requires build provenance and an SBOM before a container reaches production. How would you implement the gate?

    supply-chaincontainers
  • 97

    Cloud Composer shows a growing DAG backlog even though worker CPU is moderate. What would you inspect?

    backlog
  • 98

    An on-premises application must move to GCP with a two-hour cutover, but its dependencies are poorly documented. How would you rehearse it?

    dependencies
  • 99

    What would you include in a practical runbook for upgrading a production GKE cluster?

    kubernetesrunbooks
  • 100

    Security asks you to remove one obsolete IAM binding from 240 GCP projects by the end of the day. How would you run Go or Python automation safely?

    python