eksctl

Running eksctl on LocalStack to create EKS clusters

Introduction

eksctl is a CLI tool for creating and managing EKS clusters, Amazon’s managed Kubernetes service. LocalStack supports running eksctl on LocalStack to create EKS clusters locally. LocalStack’s EKS spin up embedded Kubernetes clusters using K3s to allow you to use the EKS APIs in your local environment.

Getting started

This guide is designed for users new to eksctl and running EKS clusters with LocalStack. Start LocalStack using your preferred method. We will demonstrate how you can create a local EKS cluster using eksctl and fetch the nodes in the cluster.

Pre-requisites

Create a cluster

To create a cluster, you can use the eksctl create cluster command. You can use the --profile flag to specify the LocalStack profile to use for the cluster.

Run the following command to create a cluster:

$ eksctl create cluster --nodes 1 --profile localstack

Get the nodes

You can use the kubectl command to get the nodes in the cluster:

$ kubectl get nodes
Last modified May 17, 2024: Add callout shortcode (#1260) (52d305d4e)