Fundamentals
1. When would you choose GKE Autopilot over Standard, or Standard over Autopilot?
What the interviewer is testing: Whether you understand the operational contract behind each mode, rather than treating Autopilot as “Kubernetes without nodes.”
Model answer: Autopilot manages the node infrastructure and applies opinionated controls around workload configuration, security, and resource allocation. It suits teams that want to focus on deploying workloads and accept less control over node-level choices. Standard gives the platform team direct control over node pools, machine types, node configuration, and more scheduling and infrastructure options, at the cost of owning more of the node lifecycle.
I would choose based on workload requirements and the team’s operating model—not on a blanket assumption that one is cheaper or more secure. Validate required DaemonSets, privileged workloads, hardware needs, scheduling constraints, and cost behavior against the current product limitations. GKE’s Autopilot overview describes the management model and constraints.
| Consideration | Autopilot | Standard |
|---|---|---|
| Node management | Google manages nodes | Platform team manages node pools |
| Node-level customization | More constrained | More control |
| Operational work | Less infrastructure maintenance | More responsibility for node lifecycle |
| Good fit | Teams prioritizing workload operations | Platforms needing specific node control |
Follow-up: How would you verify a workload is compatible with Autopilot?
Hint: Check its pod security settings, scheduling requirements, DaemonSets, and resource requests against current Autopilot constraints.
2. How does Workload Identity Federation for GKE let a pod call a Google Cloud API?
What the interviewer is testing: Whether you can explain the boundary between Kubernetes identity and Google Cloud authorization without distributing service account keys.
Model answer: A Kubernetes service account (KSA) identifies a workload within the cluster. With Workload Identity Federation for GKE configured, the workload can use that identity to obtain short-lived credentials accepted by Google Cloud. IAM grants the KSA principal the permissions it needs on a project or resource. The pod uses its normal Google Cloud client library; it should not need a downloaded service account key.
This separates workload identity from node identity. A node’s service account should not become a shared permission bucket for every pod scheduled there. The cluster’s workload identity configuration and the IAM grant both matter; creating a KSA alone does not grant access to a bucket or API.
Example: Once the cluster is configured for Workload Identity Federation for GKE and this IAM grant exists, a pod using object-reader can be authorized to read objects from the specified bucket.
PROJECT_ID="example-project"
PROJECT_NUMBER="123456789012"
NAMESPACE="apps"
KSA="object-reader"
BUCKET="example-data"
gcloud storage buckets add-iam-policy-binding "gs://${BUCKET}" \
--member="principal://iam.googleapis.com/projects/${PROJECT_NUMBER}/locations/global/workloadIdentityPools/${PROJECT_ID}.svc.id.goog/subject/ns/${NAMESPACE}/sa/${KSA}" \
--role="roles/storage.objectViewer"
The project number, project ID, namespace, and KSA must match the cluster and workload identity principal. See the GKE Workload Identity documentation.
Follow-up: What could still prevent the pod from accessing the bucket after this grant?
Hint: Check the cluster’s workload identity configuration, KSA used by the pod, resource-level IAM policy, and application credential behavior.
3. What is the difference between a Kubernetes service account and a Google Cloud service account?
What the interviewer is testing: Whether you can distinguish an in-cluster identity from a Google Cloud IAM principal.
Model answer: A KSA is a Kubernetes API object used by pods. It participates in Kubernetes authorization and, when configured, identifies a workload to Google Cloud through Workload Identity Federation for GKE. A Google Cloud service account (GSA) is an IAM principal used to grant permissions to Google Cloud resources and APIs.
A workload does not automatically need a separate GSA. Directly granting IAM roles to a KSA principal can be a simpler identity mapping. Some integrations or existing designs use a KSA-to-GSA impersonation relationship. In either case, the important properties are explicit identity, narrow permissions, and a clear owner for each grant.
Example: A pod selects its Kubernetes service account in its pod template.
spec:
serviceAccountName: object-reader
The field does not grant Google Cloud permissions by itself; IAM policy and workload identity configuration determine those permissions.
Follow-up: Why avoid placing broad permissions on the node service account?
Hint: A node identity can be shared by many workloads, so one compromised pod may gain access beyond its intended scope.
4. How do you choose between a Kubernetes Service, a Gateway, and an Ingress?
What the interviewer is testing: Whether you can map application traffic to Kubernetes networking resources and explain where GKE-specific behavior enters.
Model answer: A ClusterIP Service gives a workload a stable in-cluster endpoint. A LoadBalancer Service requests a load balancer for a service, which is useful for direct exposure but does not by itself express a shared HTTP routing policy. A Gateway API Gateway and its route resources describe listener and routing behavior, such as routing HTTP paths to different services.
For GKE, the controller that implements a Gateway determines which capabilities and infrastructure are available. I would check the supported Gateway class and feature set rather than assume every Kubernetes implementation behaves the same. Ingress is still encountered in existing clusters; for a new design, I would compare the current GKE documentation and organizational standard before choosing a controller or API.
Example: Keep internal service discovery separate from external routing.
public client -> Gateway -> HTTPRoute -> ClusterIP Service -> Pods
The Gateway handles the north-south entry point; the ClusterIP Service remains the workload’s in-cluster address.
Follow-up: When might a LoadBalancer Service be the simpler choice?
Hint: Consider a single service that needs direct network exposure without shared HTTP routing rules.
Intermediate
5. How do requests and limits affect scheduling, throttling, and autoscaling?
What the interviewer is testing: Whether you understand that resource settings influence both runtime behavior and cluster capacity.
Model answer: Requests describe the resources the scheduler uses when placing a pod, and they also contribute to the resource basis used by many autoscaling decisions. Limits cap resource consumption: exceeding a memory limit can lead to a container being killed, while a CPU limit can throttle CPU time. An undersized request can make a workload appear to have spare capacity when it is actually under pressure; an inflated request can waste capacity or leave pods unschedulable.
I set initial values from observed behavior, then validate them under representative load. For a CPU-based Horizontal Pod Autoscaler (HPA), request configuration matters because utilization is evaluated relative to the requested CPU. Resource requests should therefore be treated as an operational input, not just a Kubernetes manifest formality.
Example:
resources:
requests:
cpu: "250m"
memory: "256Mi"
limits:
memory: "512Mi"
This sets a CPU request and a memory request and limit; it intentionally does not set a CPU limit. Whether to use CPU limits depends on the workload and the team’s measured behavior.
Follow-up: Why might an HPA fail to scale on CPU utilization even when the workload is busy?
Hint: Check resource requests, metrics availability, the HPA target, and whether the observed signal represents the bottleneck.
6. Explain the difference between pod autoscaling and cluster autoscaling.
What the interviewer is testing: Whether you can describe both layers of scaling and their dependency on each other.
Model answer: A Horizontal Pod Autoscaler changes the number of pod replicas based on configured metrics. It cannot make a pod schedulable if the cluster has no suitable capacity. A cluster autoscaler responds to pending pods by changing node capacity when its configuration and constraints allow it. In Standard, node pool configuration is part of the platform team’s responsibility. Autopilot manages nodes, but workload resource requests and scheduling requirements still influence whether workloads can be placed.
The useful diagnostic sequence is to ask: did the workload signal request more replicas; did the scheduler place them; if not, were they pending because of capacity, affinity, topology, quotas, or another constraint; and did the infrastructure layer add suitable capacity? GKE documents its cluster autoscaler behavior.
Example:
HPA adds replicas -> scheduler finds no node -> pods remain pending
|
v
cluster capacity may grow
Autoscaling can lag behind a sharp traffic increase, so it is not a replacement for understanding baseline capacity and startup time.
Follow-up: What would you inspect if HPA replicas increase but pods remain pending?
Hint: Look at pod events, node capacity, resource requests, scheduling constraints, and quotas.
7. How do you roll out a service without taking down healthy capacity?
What the interviewer is testing: Whether you can combine deployment strategy with health checks and disruption controls.
Model answer: I would define readiness to mean that an instance can serve its intended traffic, and liveness to detect a process that should be restarted. A startup probe is useful when an application needs time to initialize and should not be treated as dead during that period. These probes are not interchangeable: a liveness check that depends on a fragile downstream service can restart every pod during a dependency outage.
A rolling update limits how many pods are removed or added at once. A PodDisruptionBudget (PDB) can constrain certain voluntary disruptions, but it is not a general guarantee against application failure or every kind of disruption. I would also verify graceful shutdown, enough replicas for the desired availability, and that the service only routes to ready pods.
Example:
strategy:
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
The update asks Kubernetes to avoid voluntarily reducing the desired replica count below availability during the rollout, while allowing an extra pod to be created. Capacity limits can still prevent progress.
Follow-up: What is the risk of making a readiness probe too strict?
Hint: A transient dependency or startup condition can remove otherwise useful instances from service.
8. How would you provide secrets to GKE workloads?
What the interviewer is testing: Whether you understand secret exposure paths and can avoid turning configuration delivery into long-lived credential distribution.
Model answer: First, separate non-sensitive configuration from secrets. For a workload that needs Google Cloud secrets, I would generally prefer an application identity with narrowly scoped Secret Manager access, using Workload Identity Federation for GKE rather than a service account key stored in a manifest. The application can retrieve secrets through the Google Cloud API, or a supported integration can expose them to a pod. The choice depends on rotation behavior, application requirements, and the operational model.
Kubernetes Secrets are not automatically a complete secrets-management solution. Consider access control, encryption configuration, auditability, rotation, accidental logging, and who can read the objects. Do not bake secrets into container images, commit them to source control, or print them during startup.
Example: Grant a workload access only to the secret it needs, then have the application use its pod identity to retrieve it. Avoid granting project-wide Secret Manager access when resource-level access is sufficient.
Follow-up: What changes when a secret rotates while a workload is running?
Hint: Decide whether the application can refresh it, whether a restart is required, and how to prevent stale credentials from causing an outage.
9. How would you design private access and egress for a GKE cluster?
What the interviewer is testing: Whether you can distinguish cluster control-plane access, pod connectivity, and outbound dependencies.
Model answer: “Private cluster” is not a complete network design. I would identify who needs to reach the control plane, how nodes and pods reach Google APIs, how workloads reach private services, and how internet egress is controlled. The answer may involve private IP ranges, routing, firewall rules, DNS, Cloud NAT, Private Google Access, or private service connectivity, depending on the topology and dependency paths.
I would start with explicit flows: source, destination, protocol, and required direction. Then I would verify name resolution, routes, firewall policy, and return paths. Private connectivity often fails because a team considers only the inbound path or assumes that making nodes private automatically provides the required outbound access. GKE’s private cluster documentation is a useful reference for the cluster-specific choices.
Example: Document a flow before implementing it.
pod -> private DNS name -> VPC route -> approved destination
The exact route and egress mechanism depend on the destination and network design.
Follow-up: A pod can resolve a private service name but cannot connect. What do you check next?
Hint: Check routes, firewall rules, destination listeners, return traffic, and any policy applied to the pod.
Senior and system design
10. How would you make GKE observability useful during an incident?
What the interviewer is testing: Whether you can connect service symptoms to Kubernetes and infrastructure signals, with enough context to diagnose rather than merely collect telemetry.
Model answer: I would define telemetry around the service’s user-visible behavior and its dependencies. Logs should be structured and carry request or trace correlation fields. Metrics should show request outcomes and latency at the service boundary, plus resource pressure and scheduling health at the platform boundary. Traces should connect a request across service calls and record useful attributes without putting secrets or high-cardinality user data into telemetry.
I would instrument application code with OpenTelemetry and export through the organization’s chosen collector and backend. For GKE, I would correlate application telemetry with pod restarts, pending pods, node pressure, and deployment changes. Google documents OpenTelemetry instrumentation; the OpenTelemetry Go documentation describes the Go APIs.
Example: minimal Go span instrumentation
package checkout
import (
"context"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
)
func Authorize(ctx context.Context, orderID string) error {
ctx, span := otel.Tracer("checkout").Start(ctx, "payment.authorize")
defer span.End()
span.SetAttributes(attribute.String("payment.operation", "authorize"))
return callPaymentProvider(ctx, orderID)
}
This assumes the service has initialized an OpenTelemetry SDK and configured an exporter. Instrumentation without an SDK/export pipeline can create spans in process without making them available to operators.
Follow-up: How would you find the cause of rising latency when error rate is unchanged?
Hint: Compare traces and dependency latency with CPU throttling, saturation, queueing, and request volume.
11. How would you isolate multiple teams sharing a GKE cluster?
What the interviewer is testing: Whether you recognize that namespaces are useful organization boundaries, but not a complete security boundary by themselves.
Model answer: I would define the threat model first: accidental interference, compromised workload, untrusted tenant code, or regulatory isolation have different requirements. Namespaces provide a place to scope Kubernetes resources and policies. I would pair them with least-privilege RBAC, network policies, resource quotas and limits, admission controls, and separate workload identities. I would ensure teams cannot change cluster-scoped resources or grant themselves broader access.
For workloads requiring stronger isolation, I would consider separate clusters or projects rather than relying on namespace controls alone. Cluster sharing reduces duplication but increases the importance of policy enforcement and platform ownership. GKE’s multi-tenancy guidance is a starting point, not a substitute for a workload-specific threat model.
Example: one possible shared-cluster boundary
flowchart TD
Platform["Platform team"]
Cluster["Shared GKE cluster"]
TeamA["Team A namespace"]
TeamB["Team B namespace"]
Policy["RBAC and admission policy"]
Identity["Workload identity and IAM"]
Network["Network policy"]
Platform --> Cluster
Cluster --> TeamA
Cluster --> TeamB
Policy --> TeamA
Policy --> TeamB
Identity --> TeamA
Identity --> TeamB
Network --> TeamA
Network --> TeamBThis illustrates layered controls; namespaces alone do not provide the isolation shown by the whole design.
Follow-up: What workload would make you choose a separate cluster?
Hint: Consider the threat model, privilege requirements, compliance boundary, blast radius, and operational cost.
12. Design a resilient GKE service for a regional failure.
What the interviewer is testing: Whether you can reason from service objectives through topology, state, traffic, and recovery—not just add replicas.
Model answer: I would first clarify the required availability and recovery objectives, traffic shape, data durability needs, and acceptable failover behavior. Then I would decide whether a regional cluster is sufficient for zonal failures or whether the service needs a multi-region design for a regional failure. Pod replicas spread across zones improve resilience to a zone loss, but they do not by themselves provide regional disaster recovery.
The design must include the application’s state and dependencies. A multi-region service needs a traffic failover strategy, data replication and consistency decisions, capacity in the recovery region, and an operational runbook. I would test failover and recovery rather than treat a topology diagram as proof of resilience. Regional redundancy also has cost and complexity; it should follow the service objective.
Example:
flowchart LR
Client["Clients"]
Router["Global traffic routing"]
RegionA["Primary region"]
RegionB["Recovery region"]
AppA["GKE service A"]
AppB["GKE service B"]
DataA["Regional data A"]
DataB["Replicated data B"]
Client --> Router
Router --> RegionA
Router --> RegionB
RegionA --> AppA
RegionB --> AppB
AppA --> DataA
DataA --> DataB
AppB --> DataBThe diagram is only a starting point; data replication semantics and failover ownership determine whether the design meets its recovery objectives.
Follow-up: What would you test before claiming the service survives a regional outage?
Hint: Exercise traffic failover, dependency availability, data recovery, capacity, and the documented operator procedure.
13. How would you manage GKE upgrades and fleet-wide policy safely?
What the interviewer is testing: Whether you can make change routine, observable, and reversible across clusters.
Model answer: I would treat Kubernetes and GKE upgrades as an ongoing platform process, not an occasional emergency. I would track supported versions and release channels, test workloads and add-ons against upgrade changes, and roll changes through representative environments before broader rollout. Before an upgrade, check deprecated APIs, disruption budgets, capacity, node availability, and workload readiness. GKE provides managed upgrade capabilities, but platform teams still own compatibility and application behavior.
For multiple clusters, I would define consistent policy and configuration, then stage rollout by risk. Keep an inventory of cluster purpose, owners, locations, versions, and critical add-ons. Measure upgrade health and maintain a clear exception process for workloads that cannot move on the normal schedule. See the GKE cluster upgrades documentation.
Example: A practical rollout sequence is:
development -> pre-production -> low-risk production -> remaining production
Promotion should depend on health checks and an agreed observation period, not merely on the upgrade command returning successfully.
Follow-up: What would you do if a node upgrade leaves pods pending?
Hint: Inspect capacity, scheduling constraints, disruption budgets, pod events, and whether the affected workloads can run on the remaining nodes.
Observability: signals, objectives, and paging
A strong GKE answer distinguishes the application’s user-facing service signals from the underlying platform signals. Instrument both, then use traces and correlated logs to move from a symptom to a cause.
What to log: Use structured logs with a timestamp, severity, service name, environment, trace and span identifiers where available, and a stable error category. Avoid logging credentials, tokens, or sensitive request payloads. Keep fields consistent across services so searches and dashboards remain usable.
{
"severity": "ERROR",
"service": "checkout",
"environment": "production",
"message": "payment authorization failed",
"error_code": "provider_timeout",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"span_id": "00f067aa0ba902b7",
"http_status": 502
}
Key metrics: Apply RED (Rate, Errors, Duration) to request-serving services. Apply USE (Utilization, Saturation, Errors) to relevant resources. For Kubernetes, include pending pod counts, restarts, readiness, and capacity signals; these help explain a service-level symptom but should not replace it.
| Scope | Useful signals |
|---|---|
| Service RED | Request rate, error ratio, latency distributions |
| Compute USE | CPU and memory utilization, throttling or pressure, resource errors |
| Kubernetes operations | Pending pods, restarts, readiness, node pressure, rollout progress |
| Dependencies | Request rate, errors, latency, connection or queue saturation |
SLI/SLO examples: Set targets from product expectations and measured service behavior; the values below are illustrative objectives, not universal GKE defaults.
| SLI | Example SLO definition | Measurement boundary |
|---|---|---|
| Availability | Successful eligible requests divided by eligible requests | Public or internal service entry point |
| Latency | Eligible requests completing within a defined threshold | Service request distribution |
| Recovery | Time to restore service after a declared failure | Incident start to restored SLI |
Alerts worth paging on: Page for sustained burn of the availability or latency error budget, a severe customer-visible failure, or a condition that threatens imminent recovery—for example, widespread inability to schedule critical workloads. Route lower-severity symptoms, such as an isolated pod restart or a single noisy resource metric, to dashboards or non-paging notifications unless they predict a service impact.
Comparison: closely related GKE scaling and identity choices
| Choice | Use it for | Do not assume |
|---|---|---|
| HPA | Changing pod replica count from configured metrics | It adds node capacity |
| Cluster autoscaler | Adjusting node capacity to accommodate eligible pending pods | Every pending pod is caused by insufficient nodes |
| Autopilot | Delegating node management and using its workload operating model | Every workload configuration is permitted or automatically optimal |
| Standard node pools | Controlling node configuration and pool-level choices | The team can ignore node upgrades and capacity |
| KSA principal with IAM | Granting Google Cloud access to a specific Kubernetes workload identity | A KSA has permissions merely because it exists |
| Node service account | Providing node-level Google Cloud identity where required | It is an appropriate shared identity for every pod |
Common mistakes candidates make
- Saying that a private cluster automatically has all the required outbound connectivity.
- Confusing a Kubernetes service account with a Google Cloud service account.
- Giving broad Google Cloud permissions to a node identity because it is faster to configure.
- Treating namespaces as sufficient isolation without RBAC, network policy, resource controls, and a threat model.
- Increasing HPA replicas without checking whether the scheduler can place the resulting pods.
- Setting resource requests from guesswork and then treating autoscaling output as trustworthy.
- Using liveness probes to test every downstream dependency, causing restart cascades during an outage.
- Assuming a PodDisruptionBudget prevents all unavailability.
- Calling a multi-zone cluster a regional disaster-recovery strategy without examining state and traffic failover.
- Listing dashboards and log tools without defining service-level signals, trace correlation, or paging criteria.
- Describing an upgrade strategy as “automatic” without explaining compatibility testing, rollout stages, and recovery.
Quick-revision checklist
- Explain the operational trade-off between Autopilot and Standard.
- Trace pod identity from KSA through Workload Identity Federation to IAM.
- Distinguish identity, authentication, and authorization.
- Separate in-cluster service discovery from external HTTP routing.
- Explain how requests affect scheduling and CPU-based HPA calculations.
- Diagnose the difference between pod scaling and node capacity scaling.
- Describe readiness, liveness, startup probes, and disruption budgets accurately.
- Name the network paths a private workload needs, including outbound dependencies.
- State the isolation controls required beyond namespaces.
- Design resilience around the service objective, data, traffic, and recovery procedure.
- Include structured logs, RED and USE metrics, and distributed traces.
- Page on user impact or imminent service failure, not every infrastructure fluctuation.
- Treat upgrades as staged, observable changes with an ownership and exception process.
This article was generated with AI. #AIGenerated