Interview questions and model answers
"Explain IRSA."
The cluster has an OIDC issuer registered as an IAM identity provider. I create an IAM role whose trust policy allows AssumeRoleWithWebIdentity only for a specific namespace and service account, and annotate that service account with the role ARN. EKS injects a projected, short-lived token into pods using it, and the AWS SDK exchanges it with STS for temporary credentials. So each workload gets least-privilege permissions without node roles or static keys. EKS Pod Identity is the newer alternative — associations through the EKS API and a reusable trust policy for pods.eks.amazonaws.com.
"Your cluster ran out of IPs at peak. Short and long term?"
Short term: free capacity — tune the CNI warm pool, scale down idle workloads, add a new larger subnet for a new node group. Long term: enable prefix delegation for density, add a 100.64.0.0/10 secondary CIDR with custom networking so pods use separate subnets, size subnets for pods from the start, alert on available IPs per subnet, and consider IPv6 for new clusters.
"Karpenter vs Cluster Autoscaler?"
Cluster Autoscaler grows and shrinks predefined node groups through ASGs. Karpenter looks at pending pods and launches right-sized instances directly from a wide set of types, consolidates underused nodes, handles Spot interruptions natively and replaces drifted nodes — usually faster and cheaper. I'd use Karpenter with NodePools for on-demand system workloads and Spot-friendly general workloads, with disruption budgets and PDBs.
"How do you give developers read-only kubectl access safely?"
Access entries mapping their SSO IAM role to the AmazonEKSViewPolicy scoped to their namespaces, or to a Kubernetes group bound to a custom read-only Role that excludes secrets. No static credentials; access goes through aws eks update-kubeconfig with their SSO role, and audit logs record actions.
"Walk me through upgrading EKS from 1.29 to 1.31."
Two sequential upgrades. For each: check upgrade insights and scan manifests and charts for removed APIs, confirm add-on and controller compatibility, check PDBs, test in non-prod; then upgrade the control plane, then managed add-ons — VPC CNI, CoreDNS, kube-proxy, EBS CSI — then node groups or Karpenter-managed nodes via AMI drift, and verify. For risky jumps, a blue/green cluster built with Terraform and Flux, shifting traffic gradually.
"Pods can't pull from ECR after moving nodes to private subnets."
They lost their path to ECR. Add a NAT gateway, or better, VPC interface endpoints for ecr.api and ecr.dkr plus an S3 gateway endpoint because image layers come from S3, with private DNS enabled and security groups allowing 443 from the nodes. Also confirm the node role still has ECR read permissions.
"How did you structure environments with Kustomize and Flux?" (example answer)
"We kept a base for each application with Deployment, Service, Ingress and config generators, and overlays per environment — dev, staging, prod — with patches for replicas, resources, ingress hosts and image tags. A cluster directory per environment defines Flux Kustomizations pointing at the right overlays, with dependsOn so infrastructure controllers and CRDs come first. CI builds and pushes images, then promotion is a commit changing the image tag in the overlay — via image automation for lower environments and a reviewed PR for production. Flux reconciles and health-checks the workloads, and rollback is a Git revert."
"How do you handle an AZ failure in EKS?"
Design for it beforehand: nodes in three AZs, topology spread constraints and PDBs so replicas are spread, enough spare capacity or fast Karpenter provisioning in the remaining AZs, multi-AZ data stores like RDS Multi-AZ, and awareness that EBS-backed pods are pinned to their AZ — so stateful systems should replicate at the application level. Load balancers stop routing to the failed AZ's targets automatically.