Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Deploying an EKS Cluster using Pulumi on LocalStack

In this example, we will demonstrate how to deploy an AWS EKS cluster using Pulumi on LocalStack. With the help of the Pulumi Python SDK, we will declaratively provision AWS resources & infrastructure locally on LocalStack and on the real AWS cloud.

Prerequisites

Start LocalStack

export LOCALSTACK_AUTH_TOKEN=<your-auth-token>
localstack auth set-token $LOCALSTACK_AUTH_TOKEN
localstack start -d
localstack wait -t 30

Initialize Pulumi Stack

pulumilocal stack init python-eks-testing
pulumilocal config set aws:region us-east-1

Deploying the stack

To preview and deploy the stack, run:

pulumilocal up

You can view the deployed EKS cluster by running:

awslocal eks list-clusters

Authenticating with the cluster

You can next update your KubeConfig, authenticate to your Kubernetes Cluster and verify you have API access and nodes running by running the following commands:

awslocal eks update-kubeconfig --name <CLUSTER_NAME>
kubectl get nodes

Replace <CLUSTER_NAME> with the name of your EKS cluster. For further details, see the LocalStack EKS documentation.

License

This code is available under the Apache 2.0 license.