Advanced
Searching inInstall guides
How to search
  • Paste an error message in quotes, e.g. "permission denied", to find the fix table that explains it.
  • Choose an area and a part of the guide (install, first settings, daily use, security, fixes) to go straight to the right step.
  • "two words" finds the exact phrase.
  • Plain words find names, texts and examples.
  • ↑ ↓ to move · Enter to open · Esc to close · / to search
Try:

Guide 91eksctl · Cloud

Install and use eksctl (Amazon EKS clusters)

eksctl creates and manages Amazon EKS Kubernetes clusters with one command or one YAML file: the control plane, VPC, managed node groups, add-ons, IAM roles for workloads and access for your team. Behind the scenes it uses CloudFormation. This guide installs eksctl, writes a production-like cluster file, creates the cluster, gives people and Pods access the modern way (access entries, Pod Identity), and covers upgrades, cost and the common errors.

  • 9 Lessons
  • 7 Commands

$ run as a normal user# run as root (or with sudo)

91.1

Know it before you install

EKS runs the Kubernetes control plane for you; you add node groups (EC2) or Fargate. eksctl turns a ClusterConfig file into CloudFormation stacks. Access to the cluster API is controlled by access entries (IAM users/roles → Kubernetes rights); access from Pods to AWS by EKS Pod Identity (or IRSA).

ItemValue
Programeksctl (from github.com/eksctl-io/eksctl/releases)
NeedsAWS CLI login (SSO or role), kubectl
Cluster filecluster.yaml (apiVersion: eksctl.io/v1alpha5, kind: ClusterConfig)
CreatesCloudFormation stacks eksctl-<name>-cluster and …-nodegroup-…
Kubeconfigwritten to ~/.kube/config (uses aws eks get-token)

Watch out

An EKS cluster costs money every hour (control plane + nodes + NAT gateways + load balancers). Delete lab clusters when you are done (eksctl delete cluster).

91.2

Install on RHEL and Ubuntu

curl -fsSLO "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_Linux_amd64.tar.gz"
curl -fsSL "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_checksums.txt" | grep Linux_amd64 | sha256sum --check
eksctl_Linux_amd64.tar.gz: OK
tar -xzf eksctl_Linux_amd64.tar.gz
install -m 0755 eksctl /usr/local/bin/eksctl
eksctl version
aws sts get-caller-identity

91.3

First configuration: the cluster file

cluster.yaml
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
 
metadata:
  name: shop-prod
  region: eu-central-1
  version: "1.33"
  tags:
    team: platform
    env: prod
 
vpc:
  nat:
    gateway: HighlyAvailable
  clusterEndpoints:
    publicAccess: true
    privateAccess: true
  publicAccessCIDRs: ["203.0.113.0/24"]
 
iam:
  withOIDC: true
 
accessConfig:
  authenticationMode: API
 
addons:
  - name: vpc-cni
  - name: coredns
  - name: kube-proxy
  - name: eks-pod-identity-agent
  - name: aws-ebs-csi-driver
 
managedNodeGroups:
  - name: general
    instanceTypes: ["m6i.large", "m6a.large"]
    minSize: 2
    desiredCapacity: 3
    maxSize: 6
    privateNetworking: true
    volumeSize: 50
    volumeEncrypted: true
    labels: { role: general }
 
cloudWatch:
  clusterLogging:
    enableTypes: ["api", "audit", "authenticator"]
PartWhy
versionPin the Kubernetes version; upgrade on purpose.
publicAccessCIDRs / privateAccessThe API is reachable only from your office/VPN (or only privately).
authenticationMode: APIAccess entries instead of the old aws-auth ConfigMap.
eks-pod-identity-agent add-onPods get AWS permissions without keys (Pod Identity).
privateNetworkingNodes in private subnets, no public IPs.
volumeEncryptedEncrypted node disks.
clusterLogging auditWho did what in the cluster, in CloudWatch.
eksctl create cluster -f cluster.yaml --dry-run | less
eksctl create cluster -f cluster.yaml
[✔]  EKS cluster "shop-prod" in "eu-central-1" region is ready
kubectl get nodes -o wide

Creating a cluster takes about 15–20 minutes.

91.4

Access for people and Pods

Give a team role access to the cluster (access entry + an EKS access policy):

eksctl create accessentry --cluster shop-prod --principal-arn arn:aws:iam::123456789012:role/PlatformAdmins --access-policy-arn arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy --access-scope type=cluster
eksctl create accessentry --cluster shop-prod --principal-arn arn:aws:iam::123456789012:role/ShopDevs --kubernetes-groups shop-devs
eksctl get accessentry --cluster shop-prod

(shop-devs then gets rights with normal Kubernetes RBAC RoleBindings.) Give a Pod's service account AWS rights with Pod Identity:

eksctl create podidentityassociation --cluster shop-prod --namespace shop --service-account-name shop-api --permission-policy-arns arn:aws:iam::123456789012:policy/ShopS3Read
eksctl get podidentityassociation --cluster shop-prod

91.5

Daily use: the commands and the real uses

eksctl get cluster --region eu-central-1
eksctl get nodegroup --cluster shop-prod
eksctl scale nodegroup --cluster shop-prod --name general --nodes 4
eksctl utils write-kubeconfig --cluster shop-prod
eksctl get addon --cluster shop-prod
eksctl upgrade cluster --name shop-prod --version 1.34 --approve
eksctl update addon --name vpc-cni --cluster shop-prod
eksctl upgrade nodegroup --cluster shop-prod --name general --kubernetes-version 1.34
eksctl delete cluster -f cluster.yaml --wait

Upgrade order: control plane (upgrade cluster, one minor version at a time) → add-ons → node groups.

Real uses at work:

  • Create EKS clusters from a reviewed YAML file (in Git), the same for dev and prod.
  • Add node groups for special workloads (GPU, ARM/Graviton, Spot instances).
  • Manage access entries and Pod Identity without hand-written IAM trust policies.

91.6

Make it safe

Security checklist:

  • API endpoint limited to known CIDRs, or private only; nodes in private subnets.
  • Access entries with least privilege; no shared admin user; MFA/SSO for people.
  • Pod Identity (or IRSA) — never AWS keys inside Pods.
  • Audit logs on; encrypted disks; consider envelope encryption of Secrets with KMS (secretsEncryption).
  • Keep the cluster on a supported version (standard support ~14 months); update add-ons.
  • Delete unused clusters and load balancers (cost and attack surface).

91.7

Update and remove

Download the new release as above and replace /usr/local/bin/eksctl. eksctl delete cluster removes the cluster and its CloudFormation stacks — check for left-over load balancers, EBS volumes and security groups made by apps.

91.8

Fix common problems

ProblemCauseFix
Create fails: CloudFormation CREATE_FAILEDQuota (VPCs, EIPs, vCPUs), IAM rights, or instance type not in that AZ.Read the stack events in CloudFormation; raise quotas; choose other instance types.
kubectl: You must be logged in to the server (Unauthorized)Your IAM role has no access entry.eksctl create accessentry … for your role; check aws sts get-caller-identity.
Nodes do not joinSubnets without NAT/route, or wrong security groups.Check NAT gateways and routes; node group events in the console.
Pods can not reach AWS APIs with their rolePod Identity agent missing or wrong service account.Install the eks-pod-identity-agent add-on; restart the Pods; check the association.
Delete hangsLoad balancers or ENIs made by apps still exist.Delete Services of type LoadBalancer and Ingresses first, then retry.
version not supportedVersion too old or too new for EKS.Use a version from the EKS supported list.

91.9

Next steps

1How do you give an IAM role access to the EKS API today?

With an access entry (eksctl create accessentry) and an access policy or Kubernetes groups.

2How should a Pod get AWS permissions?

With EKS Pod Identity (or IRSA) for its service account — never with keys in the Pod.

All commands in this chapter