Prev Next

Cloud / Amazon EKS Interview questions

Last updated

1. What is Amazon EKS? 2. What are the main components of an EKS cluster? 3. What is the difference between the EKS control plane and worker nodes? 4. What are the types of node groups supported by EKS? 5. What is an EKS Fargate profile? 6. How do you create an EKS cluster using eksctl? 7. What is kubeconfig and how do you configure it for EKS? 8. What is IAM Roles for Service Accounts (IRSA) in EKS? 9. What is the Amazon VPC CNI plugin? 10. What are EKS add-ons? 11. Define Amazon EKS Anywhere? 12. What is the difference between Amazon EKS and Amazon ECS? 13. How do you upgrade the Kubernetes version of an EKS cluster? 14. What is the purpose of the aws-auth ConfigMap in EKS? 15. List the ways you can access an EKS cluster's API server? 16. What is the difference between managed node groups, self-managed nodes, and Fargate in EKS? 17. How does the AWS Load Balancer Controller work with EKS? 18. What is the difference between a Kubernetes Service and an Ingress in EKS? 19. How do you provision persistent storage in EKS using the EBS CSI driver? 20. What is the difference between Cluster Autoscaler and Karpenter? 21. How do you use Security Groups for Pods in EKS? 22. Why do we use IRSA instead of storing static AWS credentials in pods? 23. How do you set up a private EKS cluster with restricted API access? 24. Why should you spread EKS worker nodes across multiple Availability Zones? 25. How do you enable EKS control plane logging with CloudWatch? 26. How do you monitor an EKS cluster with Prometheus and Grafana? 27. How do you manage Kubernetes Secrets securely in EKS? 28. What is the difference between RBAC roles and ClusterRoles in EKS? 29. How do you use taints and tolerations to control pod scheduling on EKS node groups? 30. Why would you use Spot Instances in an EKS managed node group? 31. When should you choose Fargate over EC2-based node groups in EKS? 32. How do you grant cross-account access to an EKS cluster? 33. What is the role of a service mesh like Istio or App Mesh in EKS? 34. How do you deploy applications on EKS using Helm? 35. How does a GitOps workflow with ArgoCD work on EKS? 36. Explain the lifecycle of an EKS cluster upgrade? 37. How does the EKS control plane achieve high availability internally? 38. How do you troubleshoot a node stuck in NotReady state in EKS? 39. Explain the execution flow when a pod fails with CrashLoopBackOff on EKS? 40. What happens when the VPC CNI runs out of available IP addresses? 41. Explain the internal working of the Cluster Autoscaler? 42. How does Karpenter decide which instance type to provision? 43. How do you connect multiple VPCs to an EKS cluster using Transit Gateway? 44. What is the difference between Pod Security Standards and Pod Security Policies in EKS? 45. How do you implement Kubernetes Network Policies with Calico on EKS? 46. How can you optimize the cost of running an EKS cluster? 47. Explain the execution flow of an admission control request through OPA Gatekeeper on EKS? 48. What are the scaling limits of an EKS cluster and how do you work around them? 49. How do you design a multi-region disaster recovery strategy for EKS? 50. Why doesn't EKS give you direct SSH access to the control plane?

1. What is Amazon EKS?

Amazon EKS (Elastic Kubernetes Service) is a managed service that runs the Kubernetes control plane for you across multiple AWS Availability Zones, so you don't have to install, operate, or scale the control plane yourself.

AWS runs and patches the API server, etcd, and scheduler, and automatically replaces unhealthy control plane instances, while you focus on deploying workloads and managing worker nodes (EC2, Fargate, or hybrid nodes).

EKS is upstream-conformant Kubernetes, meaning existing manifests, Helm charts, and tools like kubectl work exactly as they would on any other certified Kubernetes distribution.

Take quiz
Amazon EKS primarily manages:
The Kubernetes control plane across multiple AZs
Only the worker node operating system patches
A proprietary container runtime unrelated to Kubernetes
Because EKS is upstream-conformant, it means:
It requires a custom, EKS-only version of kubectl
Standard Kubernetes manifests and tools work unchanged
Helm charts must be rewritten for EKS specifically

2. What are the main components of an EKS cluster?

An EKS cluster has two logical halves: the control plane, fully managed by AWS, and the data plane, made up of the nodes that actually run your pods.

The control plane includes the API server, etcd, the scheduler, and controller manager, all running in an AWS-managed VPC. The data plane can be EC2 instances in managed or self-managed node groups, AWS Fargate for serverless pods, or hybrid/on-premises nodes connected via EKS Hybrid Nodes.

Networking is tied together by the Amazon VPC CNI plugin, which assigns pods real VPC IP addresses, and IAM integration connects Kubernetes RBAC to AWS permissions via IRSA or EKS Pod Identity.

Control Plane Data Plane
API server, etcd, scheduler - managed by AWS EC2 nodes, Fargate pods, hybrid nodes - you configure and scale

Take quiz
Which part of an EKS cluster is fully managed by AWS?
The worker node EC2 instances
The control plane (API server, etcd, scheduler)
Application-level Kubernetes Deployments
EKS Hybrid Nodes let you:
Run only Windows containers on EKS
Connect on-premises or edge nodes to an EKS control plane
Replace the control plane with a local etcd instance

3. What is the difference between the EKS control plane and worker nodes?

The control plane is the brain of the cluster: it stores cluster state in etcd, exposes the Kubernetes API, and decides where pods should run. In EKS, AWS owns, patches, and scales this layer across at least two Availability Zones, and you never SSH into it.

Worker nodes are where your actual application containers execute. They run the kubelet, a container runtime, and the kube-proxy, and they register themselves with the control plane so the scheduler can place pods on them.

You are responsible for the worker node layer's capacity, patching (unless using managed node groups or Auto Mode), and security groups, while AWS is fully responsible for control plane availability and patching under the shared responsibility model.

flowchart LR
  A["Control Plane - AWS managed"] -->|schedules pods| B["Worker Node 1"]
  A -->|schedules pods| C["Worker Node 2"]
  B --> D["kubelet + container runtime"]
  C --> E["kubelet + container runtime"]
Take quiz
Who is responsible for patching the EKS control plane?
The customer, via SSH access
AWS, as part of the managed service
The kubelet on each worker node
Worker nodes register with the cluster primarily through:
The kubelet talking to the control plane
A manual entry in the AWS Billing console
Direct etcd writes from the application

4. What are the types of node groups supported by EKS?

EKS supports three main ways to run compute for your pods. Managed node groups let AWS provision, tag, and roll out EC2 instances via Auto Scaling groups, handling draining and AMI updates for you.

Self-managed nodes are EC2 instances you launch and join to the cluster yourself, giving full control over the AMI and bootstrap script at the cost of more operational work.

Fargate profiles remove nodes entirely - AWS runs each pod in its own lightweight, right-sized compute environment with no EC2 instance to manage. More recently, EKS Auto Mode extends the managed model further, automatically provisioning, scaling, and upgrading both compute and core add-ons like the CNI and storage drivers.

Take quiz
Which node type removes the need to manage EC2 instances entirely?
Self-managed node groups
AWS Fargate profiles
On-premises hybrid nodes
Managed node groups differ from self-managed nodes mainly because:
AWS handles provisioning, tagging, and draining automatically
They cannot use Auto Scaling groups at all
They only support Windows AMIs

5. What is an EKS Fargate profile?

A Fargate profile is a configuration object that tells EKS which pods should run on Fargate instead of on EC2 nodes, matched by Kubernetes namespace and optional label selectors.

When a pod matching a profile is scheduled, EKS provisions a dedicated, isolated compute environment sized to that pod's CPU and memory requests - there's no shared node, so pods don't compete for resources with unrelated workloads.

Each profile also specifies the subnets Fargate pods launch into and the pod execution role used to pull images and write logs. A common pattern is a profile scoped to the kube-system namespace for CoreDNS, alongside another for a specific application namespace.

eksctl create fargateprofile \
  --cluster my-cluster \
  --name fp-default \
  --namespace my-app \
  --labels billing=on-demand
Take quiz
A Fargate profile matches pods using:
CPU architecture only
Namespace and optional label selectors
The pod's container image digest
Each Fargate pod runs:
On a shared, pre-warmed EC2 instance
In its own dedicated, isolated compute environment
Only inside the control plane VPC

6. How do you create an EKS cluster using eksctl?

eksctl is the official CLI for EKS that wraps CloudFormation to create the VPC, IAM roles, and control plane in a single command, instead of clicking through many console screens.

A minimal cluster can be created with one line specifying the cluster name, region, and Kubernetes version; eksctl then provisions a default VPC and a managed node group unless you pass a config file for more control.

For production, most teams use a YAML config file passed via -f so the entire cluster topology - VPC CIDR, node groups, add-ons, IRSA roles - is version-controlled and repeatable.

eksctl create cluster \
  --name demo-cluster \
  --region us-east-1 \
  --version 1.31 \
  --nodegroup-name standard-workers \
  --node-type t3.medium \
  --nodes 3
Take quiz
What does eksctl use under the hood to provision resources?
CloudFormation
Terraform
Ansible playbooks
For production clusters, teams typically prefer to:
Type every flag manually each time a cluster is rebuilt
Define the cluster topology in a version-controlled YAML config file
Avoid eksctl and only use the AWS console

7. What is kubeconfig and how do you configure it for EKS?

A kubeconfig file tells kubectl which cluster to talk to, what certificate authority to trust, and how to authenticate - it's the local file that turns a bare kubectl install into a working client for a specific cluster.

For EKS, you don't paste a static token into kubeconfig. Instead, the AWS CLI generates one dynamically each time via the aws eks update-kubeconfig command, which writes an entry that calls aws eks get-token (or the aws-iam-authenticator) behind the scenes using your current IAM credentials.

This means access is tied to whichever IAM identity is active when kubectl runs, and that identity must also be mapped to a Kubernetes RBAC identity via the aws-auth ConfigMap or EKS access entries.

aws eks update-kubeconfig \
  --name demo-cluster \
  --region us-east-1
Take quiz
The `aws eks update-kubeconfig` command:
Deletes the cluster's control plane
Writes local kubectl configuration pointing to the cluster with IAM-based auth
Rotates the cluster's TLS certificate
Authentication to the EKS API server via kubeconfig relies on:
A hardcoded password in the YAML file
The active IAM identity, mapped to a Kubernetes RBAC identity
SSH keys uploaded to the control plane

8. What is IAM Roles for Service Accounts (IRSA) in EKS?

IRSA lets a specific Kubernetes ServiceAccount assume an IAM role, so a pod can call AWS APIs (like S3 or DynamoDB) with narrowly scoped permissions instead of inheriting broad node-level IAM permissions shared by every pod on that node.

It works through an OIDC identity provider that EKS associates with your cluster; the ServiceAccount is annotated with the IAM role ARN, and AWS's webhook injects short-lived, auto-rotated credentials into the pod as a projected token.

AWS now also offers EKS Pod Identity as a simpler alternative that removes the OIDC provider setup and trust policy boilerplate, associating roles to service accounts directly through the EKS API, though IRSA remains widely used and fully supported.

Take quiz
IRSA allows AWS permissions to be scoped at the level of:
The entire AWS account
An individual Kubernetes ServiceAccount
Only the EC2 instance profile
EKS Pod Identity was introduced mainly to:
Replace Kubernetes RBAC entirely
Simplify assigning IAM roles to service accounts without OIDC setup
Remove the need for IAM roles altogether

9. What is the Amazon VPC CNI plugin?

The VPC CNI is the default networking plugin for EKS that assigns each pod a real, routable IP address from the VPC's CIDR range, rather than an overlay network address.

It works by attaching Elastic Network Interfaces (ENIs) to worker nodes and pre-allocating a pool of secondary IP addresses on each ENI, which the CNI's ipamd daemon hands out to pods as they're scheduled - keeping pod-to-pod and pod-to-AWS-service traffic on native VPC routing.

Because pod density is limited by how many ENIs and IPs an instance type supports, larger instances or features like prefix delegation are often needed to avoid running out of IPs on smaller nodes.

Take quiz
The VPC CNI assigns pods:
Overlay-network-only addresses invisible to the VPC
Real, routable IP addresses from the VPC CIDR
Addresses from a public IP pool by default
Pod density per node with the VPC CNI is primarily limited by:
The number of ENIs and secondary IPs the instance type supports
The Kubernetes version running on the control plane
The number of Availability Zones in the region

10. What are EKS add-ons?

EKS add-ons are operational software components - like the VPC CNI, CoreDNS, kube-proxy, and the EBS/EFS CSI drivers - that AWS packages, publishes, and lets you manage through the EKS API instead of installing manually with kubectl or Helm.

Because AWS owns the add-on lifecycle, you can see available versions, apply security patches, and upgrade them with a single API call or console click, and EKS will warn you about version compatibility with your cluster's Kubernetes version.

Add-ons can be installed in two conflict modes: OVERWRITE, which replaces any existing self-managed version of that component, or PRESERVE, which keeps your existing configuration and just registers it for management.

aws eks create-addon \
  --cluster-name demo-cluster \
  --addon-name vpc-cni \
  --resolve-conflicts PRESERVE
Take quiz
EKS add-ons are primarily useful because they:
Let AWS manage the lifecycle of core cluster components
Replace the need for a container runtime
Only apply to Fargate-based clusters
The `PRESERVE` conflict-resolution mode:
Deletes any existing configuration for that component
Keeps your existing configuration while registering the add-on for management
Forces an immediate Kubernetes version upgrade

11. Define Amazon EKS Anywhere?

EKS Anywhere is a deployment option that lets you run Kubernetes clusters on your own infrastructure - on-premises VMware, bare metal, or Nutanix - using the same open-source EKS Distro that powers EKS in AWS.

It provides a consistent cluster creation and lifecycle experience with the standard EKS tooling and conformance, letting teams keep clusters on-premises for latency, data-residency, or connectivity reasons while still using familiar upgrade and configuration patterns.

Unlike standard EKS, you operate the control plane yourself since there's no AWS-managed data center backing it; AWS instead offers optional paid support subscriptions for EKS Anywhere clusters.

Take quiz
EKS Anywhere is built on:
A completely separate, incompatible Kubernetes fork
The open-source EKS Distro used by EKS in AWS
Amazon ECS Anywhere's container runtime
With EKS Anywhere, the control plane is:
Managed entirely by AWS remotely
Operated by the customer on their own infrastructure
Not supported for production workloads

12. What is the difference between Amazon EKS and Amazon ECS?

EKS runs standard, open-source Kubernetes, giving you the full Kubernetes API, ecosystem (Helm, Operators, CRDs), and portability to other Kubernetes environments. ECS is AWS's own proprietary container orchestrator with a simpler, AWS-native API and no Kubernetes compatibility layer.

ECS tends to have a gentler learning curve and less operational overhead for teams fully committed to AWS, while EKS suits teams that want multi-cloud portability, need Kubernetes-specific tooling, or already have Kubernetes expertise.

Amazon EKS Amazon ECS
Standard Kubernetes API, portable manifests Proprietary AWS API (task definitions, services)
Larger ecosystem: Helm, CRDs, Operators Tighter, simpler native AWS integration
Steeper learning curve Faster to start for AWS-only teams

Take quiz
A key advantage of EKS over ECS is:
A proprietary, AWS-only API
Portability through the standard Kubernetes API and ecosystem
No need to manage networking at all
ECS is best described as:
A managed distribution of upstream Kubernetes
AWS's own proprietary container orchestration service
A CLI wrapper around eksctl

13. How do you upgrade the Kubernetes version of an EKS cluster?

EKS upgrades happen one minor version at a time - you can't skip, say, from 1.28 straight to 1.31 in a single step. You trigger a control plane upgrade via the console, CLI, or eksctl, and AWS updates the API server, etcd, and controllers with no downtime to the API, though brief connection drops can occur.

After the control plane is upgraded, you must separately upgrade the data plane: managed node groups can be upgraded in place (AWS drains and replaces nodes with new AMIs), while self-managed nodes need a manual rolling replacement.

Add-ons (VPC CNI, CoreDNS, kube-proxy) should be checked and updated for compatibility with the new version, since an outdated add-on can break networking or DNS after the jump.

eksctl upgrade cluster --name demo-cluster --version 1.32 --approve
Take quiz
EKS control plane upgrades must be performed:
One minor version at a time
Directly across any number of minor versions at once
Only by downgrading first
After a control plane upgrade, what else typically needs attention?
Nothing - nodes and add-ons update automatically with zero action
Data plane nodes and add-on versions for compatibility
Only the AWS account's billing plan

14. What is the purpose of the aws-auth ConfigMap in EKS?

The aws-auth ConfigMap, stored in the kube-system namespace, is the traditional bridge that maps IAM users and roles to Kubernetes usernames and groups, which is what lets an IAM identity actually authenticate and receive RBAC permissions inside the cluster.

Without an entry in this ConfigMap (or the newer EKS access entries API), an IAM principal can generate a valid token but the API server will reject it as an unknown user - cluster creation only automatically grants access to the identity that created the cluster.

AWS now recommends the EKS access entries API for managing this mapping instead of hand-editing the ConfigMap, since it validates IAM ARNs up front and avoids the classic "typo locks everyone out" failure mode.

Take quiz
The aws-auth ConfigMap's core job is to:
Store application secrets for pods
Map IAM identities to Kubernetes RBAC users and groups
Configure the VPC CNI's IP pool
A known risk of manually editing aws-auth is:
It automatically encrypts all secrets
A typo can lock out cluster access with no built-in validation
It permanently disables the API server

15. List the ways you can access an EKS cluster's API server?

By default, every EKS cluster exposes a public endpoint reachable from the internet, secured by IAM authentication and Kubernetes RBAC rather than a public/no-auth model.

You can also enable a private endpoint that resolves inside the cluster's VPC via a Route 53 private hosted zone, letting nodes and in-VPC clients reach the API without crossing the internet.

These aren't mutually exclusive: clusters can run public-only, private-only, or both public and private simultaneously, and public access can be restricted to specific CIDR ranges for an extra layer of network-level control.

  1. Public endpoint (internet-reachable, IAM + RBAC secured)
  2. Private endpoint (VPC-internal, resolved via Route 53)
  3. Public endpoint restricted to allow-listed CIDR blocks
Take quiz
By default, the EKS API server endpoint is:
Only reachable from inside the VPC
Public, but secured by IAM authentication and RBAC
Disabled until manually enabled
Public and private endpoint access modes in EKS are:
Mutually exclusive - only one can ever be enabled
Able to run simultaneously on the same cluster
Only configurable at cluster creation, never after

16. What is the difference between managed node groups, self-managed nodes, and Fargate in EKS?

These three options trade off control against operational effort. Managed node groups give AWS ownership of the underlying Auto Scaling group, AMI rollout, and graceful node draining, while still letting you customize instance types, labels, and taints.

Self-managed nodes give you full control over the AMI, bootstrap script, and lifecycle hooks - useful for custom AMIs or non-standard bootstrapping - but you own patching, scaling, and draining yourself.

Fargate removes the node concept entirely: each pod is its own micro-VM-backed environment with no shared kernel or capacity planning, ideal for bursty or unpredictable workloads, though it doesn't support DaemonSets, privileged containers, or certain host-level networking features.

Managed Node Group Self-Managed Fargate
AWS handles ASG, draining, AMI rollout You manage ASG and bootstrap fully No nodes at all - per-pod compute
Custom AMIs need extra config Any custom AMI supported No DaemonSets or privileged pods

Take quiz
Which option removes the concept of a shared node entirely?
Self-managed EC2 nodes
AWS Fargate
Managed node groups
A limitation of Fargate compared to EC2-based nodes is:
It cannot run any pods at all
It does not support DaemonSets or privileged containers
It requires manually patching the kernel

17. How does the AWS Load Balancer Controller work with EKS?

The AWS Load Balancer Controller watches for Kubernetes Ingress and Service objects and translates them into real AWS Application Load Balancers (ALB) or Network Load Balancers (NLB), rather than relying on the older in-tree cloud provider logic.

For an Ingress resource, it provisions an ALB and configures listener rules, target groups, and health checks based on annotations you set (like alb.ingress.kubernetes.io/scheme), and it can target pods directly via IP mode instead of routing through NodePorts.

For a Service of type LoadBalancer, it can provision an NLB, which is preferred for TCP-level traffic, non-HTTP protocols, or when preserving the client's source IP matters.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: app-ingress
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/target-type: ip
Take quiz
The AWS Load Balancer Controller provisions an ALB in response to:
A ConfigMap update only
A Kubernetes Ingress resource
A change to the aws-auth ConfigMap
IP target mode lets the ALB:
Route directly to pod IPs instead of via NodePort
Bypass the VPC CNI entirely
Skip health checks by default

18. What is the difference between a Kubernetes Service and an Ingress in EKS?

A Service gives a stable network identity and load-balances traffic to a set of pods based on label selectors, operating at Layer 4 in its ClusterIP and NodePort forms.

An Ingress sits a layer above that: it's an HTTP/HTTPS routing rule set (host- and path-based routing, TLS termination) that's implemented by a controller - in EKS, typically the AWS Load Balancer Controller - which then provisions the actual ALB.

In practice, you often use both together: Services provide stable internal endpoints for pods, and a single Ingress fronts multiple Services under one ALB, avoiding the cost and management overhead of a separate load balancer per Service.

Take quiz
A Kubernetes Service primarily operates at:
Layer 4, providing stable access to a set of pods
Layer 7, handling HTTP host-based routing only
The IAM permission layer
Using one Ingress in front of multiple Services typically:
Requires a separate load balancer per Service anyway
Avoids provisioning a separate load balancer for each Service
Disables TLS termination entirely

19. How do you provision persistent storage in EKS using the EBS CSI driver?

The Amazon EBS CSI driver is the add-on that lets Kubernetes dynamically create and attach EBS volumes when a pod requests persistent storage, replacing the deprecated in-tree EBS provisioner.

You define a StorageClass pointing at the ebs.csi.aws.com provisioner, then a PersistentVolumeClaim referencing that class; the driver's controller then calls the EC2 API to create a matching volume and attaches it to the node hosting the pod.

Because EBS volumes are zonal, the pod and its volume must land in the same Availability Zone - the CSI driver handles this through topology-aware provisioning, but it does mean an EBS-backed pod can't simply reschedule to any node across AZs.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: ebs-gp3
provisioner: ebs.csi.aws.com
parameters:
  type: gp3
volumeBindingMode: WaitForFirstConsumer
Take quiz
The EBS CSI driver replaced:
The deprecated in-tree EBS provisioner
The VPC CNI plugin
The Kubernetes scheduler
A key constraint of EBS-backed pods is that they:
Can freely move across any Availability Zone
Must run in the same AZ as their attached volume
Cannot use dynamic provisioning at all

20. What is the difference between Cluster Autoscaler and Karpenter?

Cluster Autoscaler works by scaling existing EC2 Auto Scaling groups up or down based on pending, unschedulable pods - it's constrained to the instance types and sizes predefined in whichever ASGs you've set up.

Karpenter takes a more direct approach: it watches for unschedulable pods and calls the EC2 API itself to launch precisely the instance types, sizes, and Availability Zones needed, without going through an Auto Scaling group at all, which usually means faster provisioning and tighter bin-packing.

Karpenter also natively supports flexible, cost-aware selection across many instance families and Spot capacity pools in a single NodePool definition, whereas achieving similar flexibility with Cluster Autoscaler generally requires managing several separate node groups.

Cluster Autoscaler Karpenter
Scales predefined Auto Scaling groups Launches EC2 instances directly, no ASG
Instance flexibility needs multiple node groups Flexible instance selection in one NodePool

Take quiz
Karpenter differs from Cluster Autoscaler mainly because it:
Only works with Fargate
Launches EC2 instances directly instead of scaling an ASG
Cannot use Spot Instances
Achieving broad instance-type flexibility with Cluster Autoscaler typically requires:
A single ASG covering every instance type
Managing multiple separate node groups
Disabling the scheduler

21. How do you use Security Groups for Pods in EKS?

Security Groups for Pods let you attach an EC2 security group directly to individual pods, rather than only to the node they run on, giving fine-grained network control at the pod level using native AWS security group rules.

It requires the VPC CNI's ENABLE_POD_ENI setting and works by attaching a "branch" ENI to the pod via the vpc-resource-controller, so the pod effectively gets its own network interface with its own security group, separate from the node's.

This is commonly used when a workload needs access to a resource (like an RDS database) that's locked down to a specific security group, without opening that access to every pod on the same node.

apiVersion: vpcresources.k8s.aws/v1beta1
kind: SecurityGroupPolicy
metadata:
  name: db-access
spec:
  podSelector:
    matchLabels: {role: db-client}
  securityGroups:
    groupIds: ["sg-0123456789abcdef0"]
Take quiz
Security Groups for Pods attach security group rules at the level of:
The entire VPC
Individual pods, via a dedicated branch ENI
Only the control plane
A typical use case for this feature is:
Restricting database access to specific pods without opening it node-wide
Replacing the need for IAM roles
Disabling all pod-to-pod communication

22. Why do we use IRSA instead of storing static AWS credentials in pods?

Static access keys baked into a pod (as environment variables or mounted secrets) never expire on their own, are easy to leak through logs or misconfigured Secrets, and typically grant the same broad permissions to every pod that uses them.

IRSA instead issues short-lived, automatically rotated session tokens scoped to exactly the IAM role attached to that pod's ServiceAccount, so a compromised pod only exposes the narrow permissions it was actually granted, not a long-lived key with account-wide reach.

It also removes an entire class of operational risk: there's no credential to rotate manually, no risk of a key being copy-pasted into the wrong manifest, and access can be revoked instantly just by updating the IAM trust policy or role permissions.

Take quiz
A key security benefit of IRSA over static credentials is:
Short-lived, automatically rotated, narrowly-scoped credentials
It removes the need for any IAM roles
It grants every pod the same admin-level access
Static AWS keys stored in pods are risky mainly because:
They automatically rotate every hour
They don't expire on their own and can leak easily
Kubernetes blocks their use by default

23. How do you set up a private EKS cluster with restricted API access?

Start by disabling the public endpoint or restricting it to specific CIDR ranges, and enabling the private endpoint so the API server resolves to a private IP inside the cluster's VPC via Route 53.

Because a fully private cluster's API server is unreachable from outside the VPC, you'll need a bastion host, VPN, AWS Client VPN, or Direct Connect to reach it for kubectl access, and worker nodes must be able to resolve the private endpoint via DNS.

You also need VPC endpoints (PrivateLink) for services like ECR, S3, and STS so that nodes without internet access can still pull images and authenticate, since a private-only cluster typically also means private subnets with no NAT gateway route to those services.

aws eks update-cluster-config \
  --name demo-cluster \
  --resources-vpc-config endpointPublicAccess=false,endpointPrivateAccess=true
Take quiz
In a fully private EKS cluster, kubectl access typically requires:
Direct internet access to the API server
A bastion host, VPN, or Direct Connect into the VPC
No authentication mechanism at all
Private clusters commonly need VPC endpoints for services like ECR and S3 because:
Nodes without internet routes still need to reach those services
VPC endpoints are required for the control plane's own etcd
It disables IAM authentication requirements

24. Why should you spread EKS worker nodes across multiple Availability Zones?

Spreading nodes across at least two or three AZs protects workloads from a single data center failure - if one AZ has a power or network event, pods can still be rescheduled onto healthy nodes in the surviving AZs.

It also plays well with EBS's zonal nature and Kubernetes' built-in topology spread constraints and pod anti-affinity rules, which can actively enforce spreading replicas of the same Deployment across different zones rather than clustering them together by chance.

A common mistake is defining a node group per AZ but leaving replica counts and affinity rules unset, which lets the scheduler pack all replicas into a single zone anyway - true resilience requires setting topologySpreadConstraints explicitly, not just having multi-AZ node capacity available.

Take quiz
Multi-AZ node groups primarily protect against:
Kubernetes API version mismatches
A single Availability Zone outage taking down the whole workload
IAM permission errors
A common mistake that undermines multi-AZ resilience is:
Setting topologySpreadConstraints too aggressively
Having multi-AZ nodes but no spread constraints, letting pods cluster in one AZ
Using managed node groups instead of self-managed

25. How do you enable EKS control plane logging with CloudWatch?

EKS control plane components - API server, audit, authenticator, controller manager, and scheduler logs - are off by default and must be explicitly enabled per log type, since each one adds CloudWatch Logs cost and volume.

Once enabled through the console, CLI, or Infrastructure-as-Code, logs stream into a CloudWatch Logs group named after the cluster, where you can build metric filters and alarms - for example, alerting on repeated 403s in the audit log, which often signals an RBAC misconfiguration.

The audit log type is particularly valuable for security reviews since it records every request made to the API server, including who made it and what resource was affected, useful for tracing unauthorized access attempts after the fact.

aws eks update-cluster-config \
  --name demo-cluster \
  --logging '{"clusterLogging":[{"types":["api","audit","authenticator"],"enabled":true}]}'
Take quiz
EKS control plane logging is:
Enabled by default for all log types
Disabled by default and must be turned on per log type
Only available for self-managed nodes
The audit log type is especially useful for:
Tracking CPU utilization trends
Reviewing every API request for security investigations
Monitoring pod restart counts

26. How do you monitor an EKS cluster with Prometheus and Grafana?

Prometheus is typically deployed into the cluster via the kube-prometheus-stack Helm chart, which also installs node-exporter (host-level metrics) and kube-state-metrics (Kubernetes object state) alongside Prometheus itself.

Prometheus scrapes metrics endpoints across the cluster on a pull basis and stores them as time series, while Grafana connects to Prometheus as a data source to render dashboards - CPU/memory per namespace, pod restart counts, node pressure, and more.

For a managed alternative, Amazon Managed Service for Prometheus and Amazon Managed Grafana offload storage and dashboard hosting to AWS, removing the operational burden of scaling Prometheus's own storage as cluster metric volume grows.

helm install kube-prom prometheus-community/kube-prometheus-stack \
  --namespace monitoring --create-namespace
Take quiz
kube-state-metrics is responsible for exposing:
Host-level CPU and memory only
The state of Kubernetes objects like Deployments and Pods
AWS billing data
Amazon Managed Service for Prometheus mainly helps by:
Removing the need for any metrics at all
Offloading Prometheus storage and scaling operational burden to AWS
Replacing Grafana as the dashboard tool

27. How do you manage Kubernetes Secrets securely in EKS?

By default, Kubernetes Secrets are only base64-encoded, not encrypted, in etcd - EKS lets you add envelope encryption using a customer-managed AWS KMS key, so Secret data is encrypted at rest with a key you control and can rotate or revoke.

For secrets that live outside the cluster (database credentials, API keys), the AWS Secrets and Configuration Provider (ASCP) for the Secrets Store CSI Driver mounts values from AWS Secrets Manager or Parameter Store directly as files in the pod, avoiding storing them as native Kubernetes Secrets at all.

Combining KMS envelope encryption for what must exist as Secrets with the CSI driver for externally-managed values gives layered protection, and access to both should be scoped tightly via IAM and Kubernetes RBAC.

Take quiz
By default, Kubernetes Secrets in etcd are:
Encrypted using AES-256 automatically
Only base64-encoded, not encrypted
Stored outside etcd entirely
The Secrets Store CSI Driver with ASCP is used to:
Mount values from AWS Secrets Manager directly into pods
Replace the Kubernetes API server
Encrypt the EKS control plane's etcd by default

28. What is the difference between RBAC roles and ClusterRoles in EKS?

A Role grants permissions scoped to a single namespace - for example, allowing a user to list pods only within the billing namespace - and is bound to subjects via a RoleBinding.

A ClusterRole defines the same kind of rule set but can be applied cluster-wide, or reused across multiple namespaces, and is also required for permissions on non-namespaced resources like nodes or PersistentVolumes.

Critically, a ClusterRole can still be scoped to one namespace by pairing it with a RoleBinding instead of a ClusterRoleBinding - this pattern is common for reusing one permission template (like "view-only") across many namespaces without duplicating the rule definitions.

Role ClusterRole
Namespace-scoped rules only Cluster-wide or non-namespaced resources
Bound via RoleBinding Bound via ClusterRoleBinding or RoleBinding

Take quiz
A ClusterRole is required when granting access to:
Only pods in a single namespace
Non-namespaced resources like nodes
A single Secret object
Pairing a ClusterRole with a RoleBinding results in:
Cluster-wide access regardless of the binding
The permissions being scoped to just one namespace
An invalid, rejected configuration

29. How do you use taints and tolerations to control pod scheduling on EKS node groups?

A taint applied to a node group repels pods by default - only pods with a matching toleration are allowed to schedule there, which is useful for reserving specialized nodes (like GPU instances) for specific workloads.

In EKS, you set taints directly on a managed node group's configuration so every node it launches carries the taint automatically, rather than tainting nodes manually one by one after they join.

Combine taints with node labels and a matching nodeSelector or affinity rule on the pod spec so the workload is both allowed onto the tainted node and actively steered there, since a toleration alone only permits scheduling - it doesn't force it.

tolerations:
- key: "workload-type"
  operator: "Equal"
  value: "gpu"
  effect: "NoSchedule"
nodeSelector:
  workload-type: gpu
Take quiz
A taint on a node group primarily:
Repels pods unless they have a matching toleration
Forces every pod to schedule there
Encrypts data on that node
A toleration alone will:
Force the scheduler to place the pod on the tainted node
Only permit, not force, scheduling on the tainted node
Remove the taint from the node permanently

30. Why would you use Spot Instances in an EKS managed node group?

Spot Instances can cost up to 90% less than On-Demand for the same instance type, making them attractive for stateless, fault-tolerant, or batch workloads where occasional interruption is acceptable in exchange for large savings.

AWS can reclaim a Spot instance with roughly a two-minute warning, so workloads need to tolerate sudden termination - Kubernetes handles this gracefully if you deploy the AWS Node Termination Handler or use Karpenter, which drains pods proactively on that interruption notice.

A common pattern mixes a small baseline of On-Demand nodes for critical, always-available capacity with a larger pool of Spot nodes across diverse instance types for elastic, cost-efficient scaling - diversifying instance types reduces the chance of many nodes being reclaimed at once.

Take quiz
Spot Instances are best suited to workloads that are:
Highly sensitive to any interruption
Stateless or fault-tolerant, able to handle termination
Running the EKS control plane itself
AWS typically gives how much warning before reclaiming a Spot instance?
About two minutes
24 hours
No warning at all

31. When should you choose Fargate over EC2-based node groups in EKS?

Fargate fits best when workloads are bursty or unpredictable and you'd rather pay per-pod than keep spare EC2 capacity idle waiting for traffic spikes - there's no node-level capacity planning at all.

It also suits multi-tenant setups where strict pod-level isolation matters, since each Fargate pod runs in its own dedicated micro-VM with no shared kernel, reducing the blast radius of a container escape compared to pods sharing a node.

EC2-based node groups remain the better choice when you need DaemonSets, privileged containers, GPU workloads, very high pod density for cost efficiency, or fine-grained control over the host OS and kernel parameters - all of which Fargate does not support.

Take quiz
Fargate is a strong fit when workloads are:
Bursty and don't justify pre-provisioned EC2 capacity
GPU-dependent and need custom kernel modules
Reliant on DaemonSets running on every node
A reason to prefer EC2 node groups over Fargate is needing:
Per-pod dedicated micro-VM isolation
DaemonSets or privileged containers
Lower operational overhead for node patching

32. How do you grant cross-account access to an EKS cluster?

Cross-account access starts with an IAM role in the cluster's own account that a principal in another account is allowed to assume, typically via an IAM role trust policy naming the other account (or a specific role ARN) as a trusted principal.

That assumed role then needs an entry in the cluster's access configuration - either the aws-auth ConfigMap or, preferably, an EKS access entry - mapping it to appropriate Kubernetes RBAC permissions, since assuming the IAM role alone doesn't grant any Kubernetes-level access.

A common real-world case is a central platform team's account needing read access to application clusters owned by other teams' accounts; scoping the assumed role's RBAC binding to a read-only ClusterRole keeps that cross-account access auditable and minimal.

Take quiz
Cross-account EKS access requires an IAM role trust policy that:
Grants access to any AWS account automatically
Names the other account or role as a trusted principal
Bypasses Kubernetes RBAC entirely
Assuming the correct IAM role from another account:
Automatically grants full Kubernetes RBAC access
Still requires a separate mapping to Kubernetes RBAC permissions
Is blocked by EKS by design

33. What is the role of a service mesh like Istio or App Mesh in EKS?

A service mesh injects a sidecar proxy (Envoy, in both Istio and the now-deprecated AWS App Mesh) next to every pod, intercepting all inbound and outbound traffic so networking concerns are handled outside the application code.

This unlocks mutual TLS between services without changing application code, fine-grained traffic shifting for canary or blue/green deployments, automatic retries and circuit breaking, and detailed per-service traffic metrics and distributed tracing.

The trade-off is added complexity and latency from the extra network hop through each sidecar, plus real operational overhead in managing the mesh's own control plane - most teams adopt a mesh only once they have enough services that manual traffic and security policy management has become genuinely painful.

Take quiz
A service mesh sidecar proxy primarily:
Replaces the Kubernetes API server
Intercepts pod traffic to add mTLS, retries, and observability
Runs only during cluster upgrades
A real trade-off of adopting a service mesh is:
Zero additional latency or operational overhead
Added latency and control-plane operational complexity
It disables all network policies

34. How do you deploy applications on EKS using Helm?

Helm packages a set of Kubernetes manifests as a versioned "chart" with configurable values, letting you template things like replica counts, image tags, and resource limits instead of hand-editing raw YAML for every environment.

You install a chart into an EKS cluster with helm install, pointing at a values file for environment-specific overrides (dev vs. prod), and Helm tracks the resulting release as a unit so you can upgrade, roll back, or uninstall it as a whole rather than tracking individual manifests.

For AWS-native components specifically, Helm is also how you typically install the AWS Load Balancer Controller, Cluster Autoscaler, Karpenter, and the kube-prometheus-stack, since AWS and the community publish official charts for each.

helm upgrade --install my-app ./charts/my-app \
  -f values-prod.yaml \
  --namespace production --create-namespace
Take quiz
A Helm chart primarily provides:
A single hardcoded manifest with no configuration options
A templated, versioned package of Kubernetes manifests
A replacement for the Kubernetes API server
Helm tracks an installed chart as:
A single release that can be upgraded or rolled back as a unit
Individual, untracked manifest files
A permanent, immutable snapshot

35. How does a GitOps workflow with ArgoCD work on EKS?

In GitOps, a Git repository is the single source of truth for what should be running in the cluster - instead of running kubectl apply manually, ArgoCD continuously compares the live cluster state against the manifests in Git and reconciles any drift.

An Application resource in ArgoCD points at a Git repo path (raw YAML, Kustomize, or a Helm chart) and a target cluster/namespace; ArgoCD's controller polls or receives webhooks on changes, then either auto-syncs or waits for manual approval depending on policy.

This gives EKS clusters a full audit trail (every change is a Git commit), easy rollback (revert the commit), and consistent multi-cluster deployment, since the same Git repo can drive several EKS clusters across environments or regions.

sequenceDiagram
  participant Dev
  participant Git
  participant ArgoCD
  participant EKS
  Dev->>Git: push manifest change
  ArgoCD->>Git: detect diff
  ArgoCD->>EKS: apply reconciled state
Take quiz
In GitOps with ArgoCD, the source of truth is:
Whatever is currently running in the cluster
The Git repository's committed manifests
The AWS console's current settings
A key benefit of this workflow is:
Every change is auditable and revertible via Git history
It removes the need for a Kubernetes API server
It only works on a single cluster ever

36. Explain the lifecycle of an EKS cluster upgrade?

An EKS upgrade moves through distinct phases rather than happening as one atomic action. First, AWS upgrades the control plane's API server, etcd, scheduler, and controller manager one minor version at a time, provisioning new control plane instances and cutting traffic over with no API downtime.

Deprecated API versions are the biggest risk at this stage - if your manifests or Helm charts reference an API removed in the target version, applying them will fail post-upgrade, so checking deprecated API usage beforehand (via tools like Pluto) is standard practice.

Next comes the data plane: managed node groups can be upgraded in place, where AWS launches new nodes on the updated AMI, cordons and drains old nodes respecting PodDisruptionBudgets, then terminates them - self-managed nodes and Karpenter-provisioned nodes require you to trigger this rollover yourself.

Finally, add-ons (VPC CNI, CoreDNS, kube-proxy, EBS CSI driver) need their own compatibility check and upgrade, since running an add-on version too old for the new control plane version is a common source of post-upgrade networking or DNS failures.

flowchart TD
  A["Check deprecated APIs"] --> B["Upgrade control plane"]
  B --> C["Upgrade/roll data plane nodes"]
  C --> D["Upgrade add-ons for compatibility"]
  D --> E["Validate workloads"]
Take quiz
The biggest risk during the control plane upgrade step is:
Node group AMI incompatibility
Manifests referencing deprecated or removed API versions
Loss of all persisted etcd data
A common cause of post-upgrade networking failures is:
Add-ons like the VPC CNI being too old for the new control plane version
Setting too many topology spread constraints
Using managed node groups instead of self-managed

37. How does the EKS control plane achieve high availability internally?

AWS runs multiple API server replicas and an etcd cluster spread across at least two, typically three, Availability Zones for every EKS cluster, so a single AZ failure doesn't take down API access or lose committed cluster state.

etcd itself uses the Raft consensus protocol, requiring a majority (quorum) of its members to agree before committing a write - spreading members across AZs means the cluster tolerates the loss of a whole AZ's etcd members while still maintaining quorum with the rest.

A network load balancer in front of the API server replicas handles failover transparently to clients, and AWS continuously monitors control plane health, automatically replacing any unhealthy component without any customer action or visible downtime for well-behaved clients that retry transient errors.

Take quiz
EKS control plane HA relies on spreading components across:
A single Availability Zone for consistency
Multiple Availability Zones for etcd and API servers
Multiple AWS Regions by default
etcd's Raft consensus protocol requires:
Unanimous agreement from every single member
A majority quorum of members to commit a write
No coordination between members at all

38. How do you troubleshoot a node stuck in NotReady state in EKS?

Start with kubectl describe node <name> to read the node's Conditions section - a NetworkUnavailable or MemoryPressure condition points to a very different root cause than a kubelet that's simply stopped reporting.

If the condition suggests networking, check whether the VPC CNI's aws-node pod on that node is running and check its logs; a common cause is the node running out of available IP addresses to assign to pods, which surfaces as CNI errors rather than an obvious node fault.

If the kubelet itself seems unresponsive, connect via SSM Session Manager (avoiding the need for SSH/bastion setup) and check systemctl status kubelet and its journal logs - frequent culprits include disk pressure from log/image buildup, an expired or misconfigured node IAM role losing API server trust, or security group rules blocking the node-to-control-plane path.

If none of that resolves it, cordon and drain the node, then let the node group (or Karpenter) terminate and replace it - for managed node groups this is often faster than continuing to debug a single bad instance.

Take quiz
The first diagnostic step for a NotReady node should be:
Immediately terminating the instance
Reading the node's Conditions via kubectl describe node
Deleting the entire node group
A node running out of available pod IPs typically manifests as:
A MemoryPressure condition only
CNI/aws-node errors related to IP address assignment
A control plane etcd failure

39. Explain the execution flow when a pod fails with CrashLoopBackOff on EKS?

CrashLoopBackOff means the container inside the pod is starting, exiting, and Kubernetes is repeatedly restarting it with an increasing backoff delay (10s, 20s, 40s, up to a cap) between attempts - it's a symptom, not a root cause by itself.

The kubelet on the node runs the restart loop locally: it invokes the container runtime to start the container, watches the exit code, and if the exit wasn't clean (non-zero, or an OOM kill), it waits the current backoff interval before trying again and reports the pod's state back to the API server.

kubectl logs <pod> --previous is the critical first command, since it retrieves logs from the last failed attempt rather than the pod's rapidly restarting current instance, and kubectl describe pod reveals whether the last termination reason was OOMKilled, a failed liveness probe, or an application-level panic/exit.

Common root causes on EKS specifically include missing IRSA/Pod Identity permissions causing the app to fail on startup when it can't reach an AWS API, a misconfigured ConfigMap or Secret mount, or resource limits set too low for the container's actual memory usage.

sequenceDiagram
  participant Kubelet
  participant Runtime
  participant API as API Server
  Kubelet->>Runtime: start container
  Runtime-->>Kubelet: exits non-zero
  Kubelet->>API: report CrashLoopBackOff
  Kubelet->>Runtime: retry after backoff delay
Take quiz
The most useful first command for diagnosing CrashLoopBackOff is:
kubectl delete pod
kubectl logs --previous
kubectl scale deployment
An EKS-specific cause of CrashLoopBackOff can be:
Missing IRSA/Pod Identity permissions failing app startup
The control plane being publicly accessible
Having too many Availability Zones configured

40. What happens when the VPC CNI runs out of available IP addresses?

When a node's attached ENIs have no more secondary IP addresses to assign, new pods scheduled to that node stay stuck in ContainerCreating, and the CNI logs an error indicating it couldn't allocate an IP - the pod isn't rejected by the scheduler, it's stuck at the network setup step.

The ipamd daemon on the node normally pre-allocates a warm pool of extra IPs ahead of demand, but if the instance type's maximum ENI/IP capacity is fully exhausted, ipamd can't attach another ENI or secondary IP no matter how much warm-pool tuning you do.

The practical fixes are increasing the instance size (larger instances support more ENIs/IPs), enabling prefix delegation so each ENI slot gets a /28 block of IPs instead of one IP at a time - dramatically raising pod density per node - or reducing pod density expectations by adjusting max-pods per node type.

Take quiz
A pod on a node with no available CNI IPs will typically:
Be immediately rejected by the scheduler
Stay stuck in ContainerCreating
Automatically move to a different AWS Region
Prefix delegation helps by:
Disabling IP allocation entirely
Assigning a block of IPs per ENI slot instead of one at a time
Removing the need for the VPC CNI

41. Explain the internal working of the Cluster Autoscaler?

Cluster Autoscaler polls the scheduler's state every ~10 seconds, looking for pods in Pending status that failed to schedule due to insufficient resources - that's its sole scale-up trigger, not raw CPU/memory utilization.

For scale-up, it simulates whether adding a node from each configured Auto Scaling group would let the pending pod schedule, using the same predicates the real scheduler would apply, then picks a group and calls the EC2 Auto Scaling API to increase its desired capacity.

For scale-down, it looks for nodes whose utilization has stayed below a threshold (default 50%) for a set period, checks that every pod on the node could be rescheduled elsewhere without violating PodDisruptionBudgets, node affinity, or other constraints, then cordons, drains, and terminates it.

Because it works at the Auto Scaling group level, it has no visibility into aggregate cross-group instance flexibility the way Karpenter does - it can only grow or shrink the specific groups it's been given.

Take quiz
Cluster Autoscaler's scale-up trigger is:
Pending pods that failed to schedule due to resource shortage
Raw node CPU utilization percentage
A fixed schedule set by the administrator
Before scaling down a node, Cluster Autoscaler checks that:
The node has been running for over a year
All its pods could reschedule elsewhere without violating constraints
The control plane is being upgraded

42. How does Karpenter decide which instance type to provision?

Karpenter reads the aggregate resource requests (CPU, memory, GPU) and scheduling constraints (node affinity, taints/tolerations, topology spread) of all currently unschedulable pods together, rather than reacting to one pod at a time.

It then consults the constraints defined in your NodePool and EC2NodeClass - allowed instance families, architectures, capacity types (Spot vs On-Demand), and zones - and computes the set of EC2 instance types that satisfy every pending pod's requirements at once.

From that candidate set, Karpenter's provisioning algorithm favors the option that best "bin-packs" the pending pods (minimizing wasted capacity and the number of new nodes needed) while respecting your price and diversity preferences, then calls the EC2 API directly to launch it - no Auto Scaling group involved.

flowchart LR
  A["Unschedulable pods"] --> B["Aggregate requests + constraints"]
  B --> C["Match against NodePool / EC2NodeClass"]
  C --> D["Select best bin-packing instance type"]
  D --> E["Launch via EC2 API"]
Take quiz
Karpenter evaluates instance type decisions based on:
A single pod in isolation, ignoring others
The aggregate needs of all currently unschedulable pods
A fixed instance type set once at cluster creation
Karpenter launches new capacity by:
Scaling a pre-existing Auto Scaling group
Calling the EC2 API directly, with no ASG involved
Requesting AWS Support to add nodes manually

43. How do you connect multiple VPCs to an EKS cluster using Transit Gateway?

Transit Gateway acts as a central hub that VPCs attach to, letting an EKS cluster's VPC route traffic to other VPCs (shared services, other application VPCs, or on-premises networks via a Direct Connect/VPN gateway attachment) without a full mesh of individual VPC peering connections.

You attach the cluster's VPC and each target VPC to the same Transit Gateway, then add routes in each VPC's route tables pointing traffic destined for the other VPC's CIDR at the Transit Gateway attachment, and configure the Transit Gateway's own route table to direct traffic correctly between attachments.

Security groups still apply end-to-end even through the Transit Gateway, so pods reaching resources in another VPC (like a shared RDS instance) need both the routing path and the security group rules on the target resource to explicitly allow traffic from the EKS VPC's CIDR.

Take quiz
Transit Gateway's main advantage over VPC peering at scale is:
It avoids needing a full mesh of individual peering connections
It removes the need for security groups
It replaces the EKS control plane
Even with Transit Gateway routing in place, cross-VPC access also requires:
Disabling all security groups
Security group rules on the target resource allowing the source CIDR
A separate EKS cluster per VPC

44. What is the difference between Pod Security Standards and Pod Security Policies in EKS?

Pod Security Policies (PSP) were the original Kubernetes admission mechanism for restricting risky pod configurations (privileged containers, host networking, etc.), but PSP was deprecated in Kubernetes 1.21 and removed entirely in 1.25 - EKS clusters on 1.25+ simply don't have it available.

Pod Security Standards (PSS) is the replacement model: it defines three built-in policy levels - privileged, baseline, and restricted - enforced through the built-in Pod Security Admission controller using simple namespace labels, with no separate policy objects or RBAC bindings to manage.

Because PSS is less flexible than PSP for highly custom rules, many EKS teams pair it with a policy engine like OPA Gatekeeper or Kyverno for anything beyond the three standard levels, using PSS for baseline hygiene and the policy engine for organization-specific rules.

Pod Security Policy (PSP) Pod Security Standards (PSS)
Deprecated, removed in 1.25 Current, built into the API server
Separate policy objects + RBAC bindings Simple namespace labels, 3 fixed levels

Take quiz
Pod Security Policy (PSP) was:
Introduced in Kubernetes 1.25 as the current standard
Deprecated and fully removed by Kubernetes 1.25
Never available in EKS at all
Pod Security Standards are enforced through:
Namespace labels and the built-in Pod Security Admission controller
Manually written RBAC ClusterRoleBindings
A separate CRD installed by the user

45. How do you implement Kubernetes Network Policies with Calico on EKS?

The default VPC CNI historically didn't enforce Kubernetes NetworkPolicy objects on its own, so Calico (or the VPC CNI's newer built-in network policy support) is layered in specifically to evaluate and enforce those policies at the pod's network interface.

Calico installs as a DaemonSet alongside the VPC CNI - it doesn't replace pod IP addressing, it adds an eBPF or iptables-based policy engine that intercepts traffic and checks it against your NetworkPolicy rules before allowing or dropping packets.

A typical hardening pattern starts with a default-deny NetworkPolicy per namespace, then explicit allow rules opening only the specific ingress/egress paths each workload actually needs - for example, only permitting a frontend namespace to reach a backend namespace on its service port.

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: default-deny
  namespace: production
spec:
  podSelector: {}
  policyTypes: ["Ingress", "Egress"]
Take quiz
Calico's role alongside the VPC CNI is to:
Replace pod IP addressing entirely
Enforce Kubernetes NetworkPolicy rules on pod traffic
Manage EBS volume attachment
A common network hardening pattern starts with:
Allowing all traffic by default, then never restricting it
A default-deny policy, followed by explicit allow rules
Disabling the VPC CNI entirely

46. How can you optimize the cost of running an EKS cluster?

Right-sizing is usually the biggest lever: setting realistic CPU/memory requests (rather than copy-pasted defaults) lets the scheduler and autoscaler pack pods efficiently instead of over-provisioning nodes for padding no workload actually uses.

On the compute side, blending Spot Instances for fault-tolerant workloads with a smaller On-Demand or Savings Plan baseline for critical services captures large discounts without sacrificing availability, and Karpenter's consolidation feature actively repacks pods onto fewer, cheaper nodes as workloads change.

Fargate can reduce cost for bursty or low-traffic namespaces where idle EC2 capacity would otherwise sit unused, while EKS Auto Mode reduces the operational cost of managing scaling and upgrades, even if its per-resource pricing carries a premium over self-managed EC2.

Finally, EKS control plane cost itself is a small flat hourly fee per cluster - the real savings almost always come from data-plane efficiency, so consolidating multiple small clusters isn't usually where the biggest wins are found compared to fixing node and workload sizing.

Take quiz
The single biggest cost lever in most EKS clusters is:
The flat EKS control plane fee
Right-sizing pod requests and node utilization
The number of Availability Zones used
Karpenter's consolidation feature helps cost by:
Increasing the number of running nodes automatically
Repacking pods onto fewer, cheaper nodes as workloads change
Disabling Spot Instance support

47. Explain the execution flow of an admission control request through OPA Gatekeeper on EKS?

When a user or controller submits a resource (say, a Deployment) via kubectl apply, the API server first runs authentication and RBAC authorization, then - before persisting the object - calls out to any registered validating admission webhooks, including Gatekeeper's.

Gatekeeper's webhook receives the incoming object as an AdmissionReview request and evaluates it against the Rego policies defined in its installed ConstraintTemplates and their corresponding Constraint instances - for example, a constraint requiring every pod to set resource limits.

If the object violates a constraint set to enforcementAction: deny, Gatekeeper returns a rejection in the AdmissionReview response, the API server blocks the write, and the user sees an error naming the violated policy; constraints set to dryrun instead just log the violation without blocking.

Because this happens synchronously in the request path, a slow or unavailable Gatekeeper webhook can delay or block all matching API writes cluster-wide - which is why Gatekeeper deployments should run with multiple replicas and a sensible failurePolicy setting.

sequenceDiagram
  participant User
  participant API as API Server
  participant GK as Gatekeeper Webhook
  User->>API: kubectl apply
  API->>GK: AdmissionReview request
  GK->>GK: evaluate Rego constraints
  GK-->>API: allow or deny
  API-->>User: persist or reject
Take quiz
Gatekeeper's admission check happens:
After the object is already persisted to etcd
Before the object is persisted, as a validating admission webhook
Only during scheduled nightly audits
A risk of a slow or unavailable Gatekeeper webhook is:
It has no effect on API requests
It can delay or block matching API writes cluster-wide
It automatically disables itself safely

48. What are the scaling limits of an EKS cluster and how do you work around them?

Individual EKS clusters have documented soft limits - by default up to 1,000 nodes and around 4,000 pods per cluster in many configurations - though these are AWS service quotas that can often be raised via a support request rather than hard architectural ceilings.

The more practical bottleneck is usually the API server and etcd's ability to handle request and watch load as object counts grow; large numbers of ConfigMaps, Secrets, or extremely chatty controllers can degrade API latency well before you hit the documented node/pod maximums.

Common workarounds include splitting workloads across multiple clusters (by team, environment, or region) once a single cluster's control plane shows sustained API latency, using prefix delegation and larger instances to reduce total node count for a given pod count, and auditing controllers/operators for excessive watch or list calls that add unnecessary API load.

For very large fleets, some organizations adopt a "cluster-per-team" or "cell-based" model specifically to keep each individual cluster's object count and blast radius manageable, rather than pushing a single cluster to its absolute ceiling.

Take quiz
The more practical bottleneck at scale is usually:
The fixed hourly price of the control plane
API server/etcd load from growing object and watch counts
The number of IAM users in the account
A common architectural response to hitting cluster scaling limits is:
Ignoring the issue since limits are always hard caps
Splitting workloads across multiple clusters or cells
Disabling the API server's audit logging

49. How do you design a multi-region disaster recovery strategy for EKS?

Because an EKS control plane is regional, true multi-region resilience means running independent clusters in each target region, not stretching one cluster across regions - there's no built-in cross-region control plane failover.

Application manifests and Helm releases are usually kept in sync across regions with the same GitOps repository (ArgoCD or Flux) targeting multiple clusters, so both regions run an identical, continuously reconciled configuration rather than drifting apart between failover events.

Stateful data is the harder problem: databases typically need cross-region replication (RDS cross-region read replicas, DynamoDB Global Tables, or application-level replication) set up independently of Kubernetes, since Kubernetes itself has no mechanism for replicating persistent volume data across regions.

Traffic failover is handled above the cluster layer entirely, usually via Route 53 health checks and failover routing policies, or Global Accelerator, that detect a region's unhealthy endpoints and redirect client traffic to the healthy region's load balancer.

Take quiz
An EKS control plane's regional nature means multi-region DR requires:
A single cluster stretched across two regions
Independent clusters running in each target region
No planning, since EKS handles this automatically
Cross-region traffic failover for EKS workloads is typically handled by:
The Kubernetes scheduler directly
Route 53 health checks/failover routing or Global Accelerator
The VPC CNI plugin

50. Why doesn't EKS give you direct SSH access to the control plane?

The control plane is part of AWS's managed service boundary - AWS owns the underlying infrastructure running the API server and etcd, patches it, and is contractually responsible for its availability and security under the shared responsibility model, which requires it to stay outside customer access entirely.

Allowing direct SSH would break that model: a customer-side change to etcd or the API server binary could destabilize the control plane in ways AWS could no longer guarantee or safely support, and it would undermine the isolation that lets AWS patch and upgrade the plane without customer coordination.

Instead, every supported interaction with the control plane goes through the Kubernetes API itself (via kubectl, IAM-authenticated tokens, and RBAC) or the EKS control-plane-level API (cluster config updates, logging, endpoint access) - which is sufficient for essentially all legitimate operational needs, from debugging to configuration changes, without ever needing host-level access.

Take quiz
AWS restricts control plane SSH access mainly because:
Kubernetes itself technically forbids SSH access
It sits inside AWS's managed responsibility boundary and must stay stable and patchable
SSH is deprecated as a protocol entirely
Legitimate control plane interactions instead go through:
The Kubernetes API and EKS control-plane API, not host access
A shared root password distributed to customers
Direct etcd file access over SSH
«
»

Comments & Discussions