EKS interview question · Most asked

How do you provision EKS clusters as code?

Summary

With infrastructure-as-code tools: Terraform or OpenTofu (commonly the community terraform-aws-modules/eks module), AWS CloudFormation or CDK, eksctl (a CLI that generates CloudFormation), or Crossplane and Cluster API from Kubernetes itself. Then install cluster add-ons and workloads with GitOps.

Longer Answer

A typical split: IaC creates the VPC, cluster, node pools or Karpenter prerequisites, IAM roles, access entries and EKS add-ons; a GitOps tool (Argo CD, Flux) bootstraps in-cluster components (ingress, cert-manager, external-secrets, monitoring) and applications. Keep cluster definitions modular so new environments are repeatable, and keep Kubernetes resources out of Terraform where possible to avoid two tools fighting over the same objects.

Key Points

  • Terraform/OpenTofu, CDK/CloudFormation, eksctl.
  • IaC for AWS resources; GitOps for in-cluster.
  • Repeatable environments.
  • Avoid managing in-cluster objects from two tools.

Deep dive: Terraform interview questions

More most-asked EKS questions

← All EKS questions