Skip to main content

AWS EKS Cluster

AWS EKS Cluster Provisioner

The AWS EKS Cluster Provisioner deploys a production-ready Kubernetes cluster on Amazon Web Services (AWS), utilizing assume role and aws sts to generate temporary keys, eliminating the need for hardcoded AWS credentials.

AWS EKS Specification

The eks struct configures the EKS provisioner.

  • accountId: Required AWS account ID (12 digits).
  • vpcId: Optional field for VPC (required for BYOVPC).
  • vpcCIDR: Optional field for CIDR block (/16 to /28, required for BYOVPC).
  • subnets: Optional field for subnet specifications (required for BYOVPC).
  • kubernetesVersion: Optional field for Kubernetes version (e.g., 1.30 or 1.30.14).
  • amiFamily: Optional field for AMI family (default: AmazonLinux2023).
  • tags: Optional field for AWS resource tags.
  • credentials: Required field for cloud provider credentials.
Bring your own VPC (BYOVPC)

vpcId, vpcCIDR, and subnets are required fields for BYOVPC.

Prerequisites

Required tools

  • AWS CLI — required for IAM assume-role and kubeconfig token generation
  • kubectl (optional) — for direct cluster interaction
  • astroctl — for cluster management

Finding your AWS credentials

You need your 12-digit AWS account ID. Run:

aws sts get-caller-identity --query Account --output text

Example output: 123456789012

Make sure the AWS CLI is authenticated to the account you want to deploy into. If you manage multiple accounts, check the active profile:

aws sts get-caller-identity
Find available regions and zones
astroctl cloud aws regions list
astroctl cloud aws regions zones list -r <region-name>

Connect your AWS account

Run this once per cluster before creating it. Omitting this step will cause an error during cluster creation.

astroctl cloud aws connect \
--account-id <YOUR_AWS_ACCOUNT_ID> \
--cluster-name <YOUR_CLUSTER_NAME> \
--region <YOUR_REGION>

Example:

astroctl cloud aws connect \
--account-id 123456789012 \
--cluster-name my-eks-cluster \
--region us-east-1

The CLI opens a pre-filled AWS CloudFormation link in your browser. Log into the correct AWS account in that tab, then click Create stack. The CLI waits and prints a confirmation when the IAM role is ready.

Use the same --cluster-name and --region values when you create the cluster.

Complete Field Reference

The eks struct configures the EKS provisioner. This is the authoritative reference for all available fields.

Core Fields

FieldTypeRequiredDefaultDescription
accountIdstringYes-AWS account ID (12 digits) where the cluster will be created
credentialsobjectYes-Cloud provider credentials. Only type: dynamic is supported (uses AWS STS assume role)

Networking Fields (BYOVPC)

FieldTypeRequiredDefaultDescription
vpcIdstringNo-Existing VPC ID for BYOVPC. If not provided, platform creates a new VPC
vpcCIDRstringNo-CIDR block for the VPC. Required when vpcId is provided. See Supported CIDR Ranges
subnetsmap[zone][]subnetNo-Subnet specifications per availability zone. Required when vpcId is provided
subnets[zone][].typestringYes*-Subnet type: public or private
subnets[zone][].idstringYes*-Subnet ID (e.g., subnet-0b9e119bdba3f8add)

*Required when vpcId is provided. Each zone must have at least one public and one private subnet.

Cluster Configuration Fields

FieldTypeRequiredDefaultDescription
kubernetesVersionstringNoLatestKubernetes version. Accepts: 1.30 or 1.30.14 format
amiFamilystringNoAmazonLinux2023AMI family for node groups. Values: AmazonLinux2, AmazonLinux2023, Bottlerocket, Ubuntu
tagsmap[string]stringNo-Key-value pairs for AWS resource tagging

Field Validation Rules

FieldValidation
accountIdMust be exactly 12 digits
vpcIdMust start with vpc- followed by alphanumeric characters
vpcCIDRMust be valid CIDR notation (e.g., 10.0.0.0/16)
subnets[zone][].idMust start with subnet- followed by alphanumeric characters
subnets[zone][].typeMust be one of: public, private
kubernetesVersionMust be valid K8s version format: 1.30 or 1.30.14
amiFamilyMust be one of: AmazonLinux2, AmazonLinux2023, Bottlerocket, Ubuntu

EKS Networking Architecture

EKS uses per-zone subnets with both public and private subnets in each availability zone. This differs from GKE which uses regional subnets.

See Networking Overview for visual diagrams comparing EKS architectures.

Supported CIDR Ranges

AWS VPC supports both RFC 1918 private ranges and other CIDR blocks:

Range TypeCIDR BlockAvailable IPsNotes
RFC 1918 Class A10.0.0.0/816,777,216Recommended for production
RFC 1918 Class B172.16.0.0/121,048,576172.16.x.x - 172.31.x.x
RFC 1918 Class C192.168.0.0/1665,536Common for small clusters
Shared address space100.64.0.0/104,194,304Carrier-grade NAT

VPC CIDR (vpcCIDR):

  • Prefix length: /16 to /28
  • Must not overlap with other VPCs or peered networks
  • RFC 1918 ranges recommended for production

Subnet CIDR recommendations:

Subnet TypeRecommended PrefixIPs per SubnetNotes
Public/24256NAT gateways, load balancers
Private/19 or /208,192 or 4,096Worker nodes, pods

Examples:

vpcCIDR: "10.0.0.0/16" # 65,536 IPs (recommended)
vpcCIDR: "172.31.0.0/16" # 65,536 IPs
vpcCIDR: "192.168.0.0/16" # 65,536 IPs
vpcCIDR: "10.100.0.0/20" # 4,096 IPs (smaller VPC)
CIDR Planning

When planning your VPC CIDR:

  • Leave room for future expansion (pods, services, additional subnets)
  • Avoid overlaps with on-premises networks if using VPN/Direct Connect
  • Use /16 for production clusters to ensure sufficient IP space

Bring Your Own Account (BYOA)

The astro platform allows you to bring your own account for EKS cluster creation. The following example illustrates the EKS specification, with the platform managing VPC, subnet, and other networking configurations. You only need to provide the account ID and ensure proper quota for these configurations. The astroctl will verify quota and permissions before cluster creation.

apiVersion: platform.astropulse.io/v1
kind: K8sCluster
spec:
clusterName: my-eks-cluster
provider: aws
region: us-west-2
provisioner:
type: eks
eks:
accountId: "123456789012" # your AWS account id
tags:
environment: "dev"
owner: "foo@bar.com"
credentials:
type: dynamic # uses assume role and aws sts to generate temporary keys
clusterSpec:
dataPlane:
nodeGroups:
- name: default-node-group
minNode: 1
maxNode: 3
instanceType: ondemand # or "spot" for cost savings
machineTypes:
- t3.medium
labels:
environment: dev

Bring Your Own VPC (BYOVPC)

To facilitate BYOVPC, the astroctl generates a cloudformation stack for creating a new VPC, subnets, and other networking configurations. This stack is created in the target account and region, outputting the VPC ID, CIDR block, and subnets to the console. To generate the stack, use the following command:

astroctl cloud aws generate-vpc --region <target-region> --vpc-cidr 10.0.0.0/16 --cluster-name <cluster-name> --output-file vpc.yaml

After executing the command, you will receive a cloudformation stack file. Load this stack into your AWS account to create the VPC, subnet, and other networking configurations. You can customize this stack to manage your own VPC. This stack has all the necessary configurations to create an EKS cluster with BYOVPC via astro platform.

In this example, the customer brings their own VPC for the EKS cluster.

apiVersion: platform.astropulse.io/v1
kind: K8sCluster
spec:
clusterName: my-eks-vpc-cluster
provider: aws
region: us-west-2
provisioner:
type: eks
eks:
accountId: "123456789012" # your AWS account id
vpcId: "vpc-12345678" # your VPC id
vpcCIDR: "10.0.0.0/16" # your CIDR block
subnets:
us-west-2a:
- type: public
id: subnet-0b9e119bdba3f8add
- type: private
id: subnet-09ad1a17f7ee64ded
us-west-2b:
- type: public
id: subnet-019c01369039cfb22
- type: private
id: subnet-0a40e1b1bb879d47c
us-west-2c:
- type: public
id: subnet-0be1c43d23931e8b7
- type: private
id: subnet-072d6cdf209a85b7f
tags:
environment: "dev"
owner: "foo@bar.com"
credentials:
type: dynamic # uses assume role and aws sts to generate temporary keys
clusterSpec:
dataPlane:
nodeGroups:
- name: default-node-group
minNode: 1
maxNode: 3
machineTypes:
- t3.medium
labels:
environment: dev

For BYOVPC, the astroctl validates quota, permissions, and configurations before cluster creation. Ensure subnets are in the same region as the provisioner and follow the 3 availability zone, 3 public subnet, 3 private subnet pattern. The platform checks quota, permissions, and configurations, failing if any are not met.

Cluster Updates

EKS clusters support updates to Kubernetes version, node group configurations, and cluster settings. You can use either the Console UI or the CLI.

Option 1: Console (Upgrade Wizard)

The Console provides a guided 5-step upgrade wizard:

  1. Preflight Check - Validates upgrade paths and checks for issues
  2. Readiness Report - Generates comprehensive upgrade analysis with risk score
  3. Pre-Upgrade Checklist - Interactive checklist with verification commands
  4. Configuration - Select target version and rolling update settings
  5. Confirmation - Review summary and confirm by typing cluster name

To access: Go to Clusters → Select cluster → Click Upgrade button

The wizard shows:

  • Visual version timeline (current → next → locked future versions)
  • Node group scaling controls (min/max nodes)
  • Rolling update settings (maxSurge, maxUnavailable)
  • Impact summary before execution

Option 2: CLI Commands

Version Discovery

# List available versions for this cluster
astroctl infra k8s upgrade <cluster-name> --list-versions

# Check versions for a region
astroctl cloud aws k8s-versions
astroctl cloud aws k8s-versions -r us-west-2
astroctl cloud aws k8s-versions --show-upgrade-paths

Kubernetes Version Upgrade

# Dry-run validation first
astroctl infra k8s upgrade <cluster-name> 1.30 --dry-run

# Generate readiness report
astroctl infra k8s upgrade <cluster-name> 1.30 --generate-report

# Execute upgrade
astroctl infra k8s upgrade <cluster-name> 1.30

# Skip confirmation (for automation)
astroctl infra k8s upgrade <cluster-name> 1.30 --yes

Rollback Node Groups

EKS control plane cannot be rolled back. Node groups are replaced with a blue-green deployment targeting the previous version.

# List versions available for rollback
astroctl infra k8s rollback <cluster-name> --list-versions

# Dry-run first — validates rollback path and warns about limitations
astroctl infra k8s rollback <cluster-name> 1.29 --dry-run

# Execute rollback
astroctl infra k8s rollback <cluster-name> 1.29 --yes

Scaling Node Groups

# List node groups
astroctl infra k8s scale <cluster-name> --list

# Preview changes first (dry-run)
astroctl infra k8s scale <cluster-name> <nodegroup-name> --min 3 --max 10 --dry-run

# Apply the scale
astroctl infra k8s scale <cluster-name> <nodegroup-name> --min 3 --max 10

Advanced Updates (YAML)

# Show YAML examples for your cluster
astroctl infra k8s update <cluster-name> --example

# Dry-run validation first
astroctl infra k8s update <cluster-name> -f update.yaml --dry-run

# Apply update
astroctl infra k8s update <cluster-name> -f update.yaml

# Skip confirmation (for automation)
astroctl infra k8s update <cluster-name> -f update.yaml --auto-approve

Monitor Progress

# Stream real-time progress
astroctl infra k8s progress stream <cluster-name>

# Get current status
astroctl infra k8s progress get <cluster-name>

# View operation history
astroctl infra k8s progress history <cluster-name>

Update File Reference

apiVersion: platform.astropulse.io/v1
kind: K8sClusterUpdate
spec:
# Kubernetes version
kubernetesVersion: "1.30"

# Rolling update configuration
updateConfig:
maxSurge: "1" # Nodes added during update (number or %)
maxUnavailable: "1" # Nodes down during update (number or %)
dryRun: false # Validate without applying
generateReport: false # Generate readiness report

# Node groups
nodeGroups:
- name: "default-node-group"
minNode: 2
maxNode: 8
machineTypes: ["t3.medium"]
instanceType: "ondemand" # or "spot"
labels:
workload: "general"

# EKS-specific settings
eks:
amiFamily: "AmazonLinux2023"

# Resource tags
tags:
environment: "production"

EKS Update Options

FieldValuesDescription
eks.amiFamilyAmazonLinux2023, AmazonLinux2, Bottlerocket, Ubuntu2004, Ubuntu2204, Ubuntu2404AMI family for nodes (changing triggers node replacement)

Rolling Update Strategy

Control the speed and safety of node group upgrades with --max-unavailable and --max-surge flags:

# Configure rolling update speed
astroctl infra k8s upgrade my-cluster 1.30 --max-unavailable 2 --max-surge 1

# Use percentage-based configuration
astroctl infra k8s upgrade my-cluster 1.30 --max-unavailable 25%

Smart Defaults: If you don't specify these flags, AstroPulse automatically determines optimal values:

Node Group TypeDefault StrategyWhy
Small (1-3 nodes)surge=1, unavailable=0Maintain full capacity
Medium (4-10 nodes)surge=2, unavailable=1Balance speed and safety
Large (10+ nodes)surge=10%, unavailable=10%Percentage-based scaling
GPU nodessurge=1, unavailable=0Protect expensive resources
System/Criticalsurge=1, unavailable=0Ensure cluster stability

Upgrade Process

  1. Control plane is upgraded first (AWS managed)
  2. Node groups are upgraded using blue-green replacement
  3. Karpenter provisioners are updated to use new AMIs
  4. Progress is tracked and reported in real-time
Upgrade Considerations
  • EKS only supports upgrades to sequential minor versions (cannot skip versions)
  • Control plane cannot be downgraded after upgrade
  • Node groups use blue-green replacement strategy for zero-downtime upgrades
  • Always test upgrades in a non-production environment first

KubeConfig

With simple command like below, you can set the context to the cluster and have the access to the cluster. You need to make sure to install the kubectl CLI as required.

astroctl infra k8s set-context <cluster-name>

The cluster managed by the astro platform uses aws token to authenticate the kubectl. You need to make sure aws cli installed.

Added Capabilities

The EKS provisioner automatically provisions the following capabilities:

The EKS provisioner automatically enables the following capabilities for EKS clusters:

  • Karpenter: A flexible and efficient node provisioning service. You can tailor the provisioner to your needs by referring to the NodeClasses and NodePool documentation for more information.
    • You can find the existing node classes and node pool by running kubectl -n karpenter get nodeclasses and kubectl -n karpenter get nodepools.
  • Required Roles: The necessary roles for Karpenter, External-DNS, Cert-Manager, and AWS-Load-Balancer-Controller are provisioned to ensure seamless integration.
  • AWS VPC CNI Plugin: This plugin is enabled to manage pod networking in your EKS cluster.
  • CoreDNS: A DNS service that provides name resolution for your cluster.
Additional Capabilities

You can always install addons by yourself by using the EKS marketplace.

Security

What you get out of the box

WhatHow
No stored AWS credentialsThe platform uses IAM role assumption (AWS STS) to generate short-lived credentials (~15 minutes). No long-lived access keys are stored in AstroPulse infrastructure.
Least-privilege IAM rolesA dedicated IAM role is created in your account via CloudFormation with only the permissions needed to provision and manage your cluster.
OIDC enabledAWS OIDC is enabled so your workloads can authenticate to AWS services (S3, Secrets Manager, etc.) using IAM roles — no access keys in pods.
Private node communicationCluster nodes communicate with the control plane over the private endpoint. The public endpoint is used only for external management access.

How to harden further

Restrict public API server access to known CIDRs (recommended for production)

By default, the EKS public endpoint accepts connections from any IP. You can restrict this to specific CIDRs — your office network, VPN egress, or CI/CD egress IPs — via the AWS console or eksctl:

aws eks update-cluster-config \
--name <cluster-name> \
--region <region> \
--resources-vpc-config publicAccessCidrs="35.206.79.104/32,203.0.113.0/24,10.0.0.0/8"
Include the AstroPulse egress IP

publicAccessCidrs applies to all connections — including the AstroPulse connector service. If you restrict the public endpoint without including the platform egress IP, application deployments will fail.

Always include 35.206.79.104/32 (AstroPulse platform egress IP):

--resources-vpc-config publicAccessCidrs="35.206.79.104/32,<your-office-cidr>,<your-vpn-cidr>"

BYOVPC for network isolation

Use vpcId and subnets to deploy EKS into your existing VPC. This lets you apply your own security groups, NACLs, and route tables to the cluster.

Private endpoint is always enabled

The private EKS endpoint is always enabled. Even if you restrict the public endpoint to specific CIDRs, nodes and internal workloads continue to communicate with the control plane over the private endpoint — your cluster stays fully operational.