Convert Figma logo to code with AI

eksctl-io logoeksctl

The official CLI for Amazon EKS

4,883
1,400
4,883
139

Top Related Projects

4,910

The official CLI for Amazon EKS

11,501

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code

20,922

Pulumi - Infrastructure as Code in any programming language 🚀

42,146

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.

Home for Cluster API, a subproject of sig-cluster-lifecycle

16,045

Deploy a Production Ready Kubernetes Cluster

Quick Overview

eksctl is a simple CLI tool for creating and managing clusters on Amazon EKS (Elastic Kubernetes Service). It simplifies the process of creating, upgrading, and managing EKS clusters by providing an easy-to-use command-line interface and automating many of the underlying AWS operations.

Pros

  • Simplifies EKS cluster creation and management
  • Supports GitOps workflows for cluster configuration
  • Integrates well with other AWS services
  • Provides a declarative way to define cluster resources

Cons

  • Limited to Amazon EKS, not usable for other Kubernetes providers
  • May abstract away some lower-level details, which could be a drawback for advanced users
  • Learning curve for users unfamiliar with EKS concepts
  • Dependency on AWS CLI and proper AWS account configuration

Code Examples

  1. Creating a basic EKS cluster:
eksctl create cluster --name my-cluster --region us-west-2
  1. Creating a cluster with a custom VPC and node group:
eksctl create cluster \
  --name my-custom-cluster \
  --region us-west-2 \
  --vpc-private-subnets subnet-0123abc,subnet-321cba \
  --node-private-networking \
  --nodegroup-name ng-1 \
  --node-type t3.medium \
  --nodes 3 \
  --nodes-min 1 \
  --nodes-max 5
  1. Scaling a node group:
eksctl scale nodegroup --cluster=my-cluster --name=ng-1 --nodes=5

Getting Started

  1. Install eksctl:

    # macOS
    brew tap weaveworks/tap
    brew install weaveworks/tap/eksctl
    
    # Linux
    curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
    sudo mv /tmp/eksctl /usr/local/bin
    
  2. Configure AWS CLI with your credentials:

    aws configure
    
  3. Create your first EKS cluster:

    eksctl create cluster --name my-first-cluster --region us-west-2
    
  4. Verify cluster creation:

    kubectl get nodes
    

Competitor Comparisons

4,910

The official CLI for Amazon EKS

Pros of eksctl

  • More actively maintained and developed
  • Larger community and contributor base
  • Better documentation and support

Cons of eksctl

  • Potentially more complex due to additional features
  • May have a steeper learning curve for beginners
  • Larger codebase might lead to longer build times

Code Comparison

eksctl:

func (c *ClusterConfig) ValidateClusterEndpointConfig() error {
    if c.PrivateCluster.Enabled && c.VPC.ClusterEndpoints.PublicAccess != nil && *c.VPC.ClusterEndpoints.PublicAccess {
        return errors.New("vpc.clusterEndpoints.publicAccess cannot be set to true when privateCluster.enabled is true")
    }
    return nil
}

eksctl>:

// No equivalent code found in eksctl> repository

Note: The eksctl> repository appears to be empty or non-existent. The comparison is based on the assumption that eksctl> is a less developed or alternative version of eksctl. If this is not the case, the comparison may not be accurate or relevant.

11,501

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code

Pros of aws-cdk

  • Supports multiple programming languages (TypeScript, Python, Java, etc.)
  • Provides a higher level of abstraction for AWS resources
  • Enables infrastructure as code for a wide range of AWS services

Cons of aws-cdk

  • Steeper learning curve, especially for those new to AWS
  • More complex setup and configuration compared to eksctl
  • Can be overkill for simple EKS cluster deployments

Code Comparison

eksctl:

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
  name: my-cluster
  region: us-west-2

aws-cdk:

import * as eks from '@aws-cdk/aws-eks';

const cluster = new eks.Cluster(this, 'MyCluster', {
  version: eks.KubernetesVersion.V1_21,
});

Summary

eksctl is a simpler, more focused tool specifically for creating and managing EKS clusters. It's easier to get started with and ideal for straightforward EKS deployments. aws-cdk, on the other hand, is a more comprehensive infrastructure-as-code solution that covers a broader range of AWS services. It offers greater flexibility and power but comes with a steeper learning curve. The choice between the two depends on the complexity of your infrastructure needs and your familiarity with AWS services.

20,922

Pulumi - Infrastructure as Code in any programming language 🚀

Pros of Pulumi

  • Multi-cloud support: Pulumi works with various cloud providers, not just AWS
  • Multiple programming language support: Use familiar languages like Python, TypeScript, Go, etc.
  • More flexible and powerful for complex infrastructure setups

Cons of Pulumi

  • Steeper learning curve compared to eksctl's focused approach
  • Requires more setup and configuration for simple EKS clusters
  • May be overkill for small-scale or AWS-specific projects

Code Comparison

eksctl:

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
  name: my-cluster
  region: us-west-2

Pulumi (TypeScript):

import * as eks from "@pulumi/eks";

const cluster = new eks.Cluster("my-cluster", {
    region: "us-west-2",
});

Both tools can create EKS clusters, but Pulumi offers more flexibility and control over the infrastructure. eksctl is more straightforward for simple EKS deployments, while Pulumi allows for more complex, multi-cloud setups using familiar programming languages. The choice between them depends on your specific needs, existing infrastructure, and team expertise.

42,146

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.

Pros of Terraform

  • Multi-cloud support, not limited to AWS EKS
  • Broader infrastructure management capabilities beyond just Kubernetes clusters
  • Larger ecosystem with extensive provider and module support

Cons of Terraform

  • Steeper learning curve, especially for those new to IaC
  • Requires more setup and configuration for EKS-specific tasks
  • Can be more verbose for simple EKS cluster creation

Code Comparison

eksctl:

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
  name: my-cluster
  region: us-west-2

Terraform:

resource "aws_eks_cluster" "my_cluster" {
  name     = "my-cluster"
  role_arn = aws_iam_role.eks_cluster.arn
  vpc_config {
    subnet_ids = ["subnet-12345678", "subnet-87654321"]
  }
}

Summary

eksctl is a specialized tool for creating and managing EKS clusters, offering simplicity and ease of use for AWS-specific Kubernetes deployments. Terraform, on the other hand, provides a more comprehensive infrastructure management solution with multi-cloud support but requires more setup for EKS-specific tasks. The choice between the two depends on the scope of your infrastructure needs and your familiarity with Infrastructure as Code concepts.

Home for Cluster API, a subproject of sig-cluster-lifecycle

Pros of cluster-api

  • More flexible and extensible, supporting multiple cloud providers and infrastructure types
  • Follows Kubernetes-native principles, using custom resources for cluster management
  • Enables declarative cluster lifecycle management with GitOps-friendly approach

Cons of cluster-api

  • Steeper learning curve due to its more complex architecture
  • Requires additional components and setup compared to eksctl's simpler approach
  • May have slower development cycles for specific provider implementations

Code Comparison

eksctl:

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
  name: my-cluster
  region: us-west-2

cluster-api:

apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
  name: my-cluster
spec:
  infrastructureRef:
    apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
    kind: AWSCluster
    name: my-cluster

eksctl is specifically designed for Amazon EKS, offering a streamlined experience for managing EKS clusters. It provides a simpler CLI-based approach and is easier to get started with for AWS-specific use cases.

cluster-api, on the other hand, is a more general-purpose solution that aims to standardize cluster management across different cloud providers and infrastructure types. It offers greater flexibility and extensibility but requires more setup and understanding of its architecture.

16,045

Deploy a Production Ready Kubernetes Cluster

Pros of kubespray

  • Supports multiple cloud providers and on-premises deployments
  • Offers more customization options for cluster configuration
  • Allows for deploying and managing multiple Kubernetes clusters

Cons of kubespray

  • Steeper learning curve and more complex setup process
  • Requires more manual configuration and maintenance
  • May have slower deployment times for large clusters

Code Comparison

eksctl:

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
  name: my-cluster
  region: us-west-2

kubespray:

all:
  vars:
    ansible_user: ubuntu
    ansible_become: true
    kube_version: v1.20.0
    cluster_name: my-cluster

The eksctl configuration is more concise and focused on AWS EKS, while kubespray's inventory file allows for more detailed cluster configuration across various environments.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

eksctl - The official CLI for Amazon EKS ! eksctl

Go Report Card

eksctl is a simple CLI tool for creating clusters on EKS - Amazon's new managed Kubernetes service for EC2. It is written in Go, and uses CloudFormation.

You can create a cluster in minutes with just one command – eksctl create cluster!

Gophers: E, K, S, C, T, & L

Need help? Join Eksctl Slack.

Installation

eksctl is available to install from official releases as described below. We recommend that you install eksctl from only the official GitHub releases. You may opt to use a third-party installer, but please be advised that AWS does not maintain nor support these methods of installation. Use them at your own discretion.

Prerequisite

You will need to have AWS API credentials configured. What works for AWS CLI or any other tools (kops, Terraform, etc.) should be sufficient. You can use ~/.aws/credentials file or environment variables. For more information read AWS documentation.

You will also need AWS IAM Authenticator for Kubernetes command (either aws-iam-authenticator or aws eks get-token (available in version 1.16.156 or greater of AWS CLI) in your PATH.

The IAM account used for EKS cluster creation should have these minimal access levels.

AWS ServiceAccess Level
CloudFormationFull Access
EC2Full: Tagging Limited: List, Read, Write
EC2 Auto ScalingLimited: List, Write
EKSFull Access
IAMLimited: List, Read, Write, Permissions Management
Systems ManagerLimited: List, Read

The inline policy json is listed in Minimal IAM Policies.

For Unix

To download the latest release, run:

# for ARM systems, set ARCH to: `arm64`, `armv6` or `armv7`
ARCH=amd64
PLATFORM=$(uname -s)_$ARCH

curl -sLO "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_$PLATFORM.tar.gz"

# (Optional) Verify checksum
curl -sL "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_checksums.txt" | grep $PLATFORM | sha256sum --check

tar -xzf eksctl_$PLATFORM.tar.gz -C /tmp && rm eksctl_$PLATFORM.tar.gz

sudo mv /tmp/eksctl /usr/local/bin

For Windows

Direct download (latest release): AMD64/x86_64 - ARMv6 - ARMv7 - ARM64

Make sure to unzip the archive to a folder in the PATH variable.

Optionally, verify the checksum:

  1. Download the checksum file: latest
  2. Use Command Prompt to manually compare CertUtil's output to the checksum file downloaded.
REM Replace amd64 with armv6, armv7 or arm64
CertUtil -hashfile eksctl_Windows_amd64.zip SHA256
  1. Using PowerShell to automate the verification using the -eq operator to get a True or False result:
# Replace amd64 with armv6, armv7 or arm64
 (Get-FileHash -Algorithm SHA256 .\eksctl_Windows_amd64.zip).Hash -eq ((Get-Content .\eksctl_checksums.txt) -match 'eksctl_Windows_amd64.zip' -split ' ')[0]

Using Git Bash

# for ARM systems, set ARCH to: `arm64`, `armv6` or `armv7`
ARCH=amd64
PLATFORM=windows_$ARCH

curl -sLO "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_$PLATFORM.zip"

# (Optional) Verify checksum
curl -sL "https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_checksums.txt" | grep $PLATFORM | sha256sum --check

unzip eksctl_$PLATFORM.zip -d $HOME/bin

rm eksctl_$PLATFORM.zip

The eksctl executable is placed in $HOME/bin, which is in $PATH from Git Bash.

Docker

For every release and RC a container image is pushed to ECR repository public.ecr.aws/eksctl/eksctl. Learn more about the usage on ECR Public Gallery - eksctl. For example,

docker run --rm -it public.ecr.aws/eksctl/eksctl version

Third-Party Installers (Not Recommended)

For MacOS

Homebrew

brew tap weaveworks/tap
brew install weaveworks/tap/eksctl

MacPorts

port install eksctl

For Windows

chocolatey

choco install eksctl

scoop

scoop install eksctl

Basic usage

To create a basic cluster, run:

eksctl create cluster

A cluster will be created with default parameters

  • exciting auto-generated name, e.g. "fabulous-mushroom-1527688624"
  • 2x m5.large nodes (this instance type suits most common use-cases, and is good value for money)
  • use official AWS EKS AMI
  • us-west-2 region
  • dedicated VPC (check your quotas)

Once you have created a cluster, you will find that cluster credentials were added in ~/.kube/config. If you have kubectl as well as aws-iam-authenticator commands in your PATH, you should be able to use kubectl. You will need to make sure to use the same AWS API credentials for this also. Check EKS docs for instructions.

Example output:

 $ eksctl create cluster
[ℹ]  eksctl version 0.143.0
[ℹ]  using region eu-west-2
[ℹ]  setting availability zones to [eu-west-2a eu-west-2c eu-west-2b]
[ℹ]  subnets for eu-west-2a - public:192.168.0.0/19 private:192.168.96.0/19
[ℹ]  subnets for eu-west-2c - public:192.168.32.0/19 private:192.168.128.0/19
[ℹ]  subnets for eu-west-2b - public:192.168.64.0/19 private:192.168.160.0/19
[ℹ]  nodegroup "ng-ac4c787c" will use "" [AmazonLinux2/1.25]
[ℹ]  using Kubernetes version 1.25
[ℹ]  creating EKS cluster "attractive-sculpture-1685534556" in "eu-west-2" region with managed nodes
[ℹ]  will create 2 separate CloudFormation stacks for cluster itself and the initial managed nodegroup
[ℹ]  if you encounter any issues, check CloudFormation console or try 'eksctl utils describe-stacks --region=eu-west-2 --cluster=attractive-sculpture-1685534556'
[ℹ]  Kubernetes API endpoint access will use default of {publicAccess=true, privateAccess=false} for cluster "attractive-sculpture-1685534556" in "eu-west-2"
[ℹ]  CloudWatch logging will not be enabled for cluster "attractive-sculpture-1685534556" in "eu-west-2"
[ℹ]  you can enable it with 'eksctl utils update-cluster-logging --enable-types={SPECIFY-YOUR-LOG-TYPES-HERE (e.g. all)} --region=eu-west-2 --cluster=attractive-sculpture-1685534556'
[ℹ]  
2 sequential tasks: { create cluster control plane "attractive-sculpture-1685534556", 
    2 sequential sub-tasks: { 
        wait for control plane to become ready,
        create managed nodegroup "ng-ac4c787c",
    } 
}
[ℹ]  building cluster stack "eksctl-attractive-sculpture-1685534556-cluster"
[ℹ]  deploying stack "eksctl-attractive-sculpture-1685534556-cluster"
[ℹ]  waiting for CloudFormation stack "eksctl-attractive-sculpture-1685534556-cluster"
[ℹ]  building managed nodegroup stack "eksctl-attractive-sculpture-1685534556-nodegroup-ng-ac4c787c"
[ℹ]  deploying stack "eksctl-attractive-sculpture-1685534556-nodegroup-ng-ac4c787c"
[ℹ]  waiting for CloudFormation stack "eksctl-attractive-sculpture-1685534556-nodegroup-ng-ac4c787c"
[ℹ]  waiting for the control plane to become ready
[✔]  all EKS cluster resources for "attractive-sculpture-1685534556" have been created
[ℹ]  nodegroup "ng-ac4c787c" has 2 node(s)
[ℹ]  node "ip-192-168-20-235.eu-west-2.compute.internal" is ready
[ℹ]  node "ip-192-168-80-49.eu-west-2.compute.internal" is ready
[ℹ]  waiting for at least 2 node(s) to become ready in "ng-ac4c787c"
[ℹ]  nodegroup "ng-ac4c787c" has 2 node(s)
[ℹ]  node "ip-192-168-20-235.eu-west-2.compute.internal" is ready
[ℹ]  node "ip-192-168-80-49.eu-west-2.compute.internal" is ready
[ℹ]  kubectl command should work with ".../.kube/config", try 'kubectl get nodes'
[✔]  EKS cluster "attractive-sculpture-1685534556" in "eu-west-2" region is ready
$

Install eksctl by following the installation instructions.

To discover the full range of capabilities that eksctl offers, visit eksctl.io.

A great starting point is the Getting Started guide.

You can find a comprehensive list of features here.

Contributions

Code contributions are very welcome. If you are interested in helping make eksctl great then see our contributing guide.

We follow the CNCF Code of Conduct.

Releases

Minor releases of eksctl should be expected every two weeks and patch releases will be made available as needed.

One or more release candidate(s) (RC) builds will be made available prior to each minor release. RC builds are intended only for testing purposes.

Security Policy

If you discover a potential security issue in eksctl project, please follow AWS Vulnerability Reporting process.

Do not open security related issues in the open source project.

Get in touch

Create an issue, or login to Eksctl Community Slack (#eksctl) (signup).

Logo Credits

Original Gophers drawn by Ashley McNamara, unique E, K, S, C, T & L Gopher identities had been produced with Gopherize.me.