Skip to main content

AWS CDK construct library for Amazon EKS Distro

Project description

NPM version PyPI version Release

cdk-eksdistro

CDK construct library that allows you to create Amazon EKS Distro on Amaozn EC2 instance(s).

How it works

Under the hood, cdk-eksdistro creates an Amazon Auto Scaling Group with single Amazon EC2 instance running Ubuntu Linux LTS 20.04 and installs the eks snap from the UserData.

Install

Use the npm dist tag to opt in CDKv1 or CDKv2:

// for CDKv2
npm install cdk-eksdistro
or
npm install cdk-eksdistro@latest

// for CDKv1
npm install cdk-eksdistro@cdkv1

Sample

imoprt { Cluster } from 'cdk-eksdistro';

const app = new cdk.App();

const env = {
  region: process.env.CDK_DEFAULT_REGION,
  account: process.env.CDK_DEFAULT_ACCOUNT,
};

const stack = new cdk.Stack(app, 'eksdistro-stack', { env });

new Cluster(stack, 'Cluster');

Spot Instance

To create Amazon EC2 Spot instance instead of on-demand, use the spot property:

new Cluster(stack, 'Cluster', { spot: true });

Validate the cluster

By default, the Cluster construct creates a single-node EKS-D cluster on AWS EC2 with the latest Ubuntu Linux LTS AMI. To validate the cluster, open the EC2 console, select the instance and click the Connect button and select session manager.

Run the following commands to execute kubectl in the cluster.

Reference

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdk-eksdistro-2.0.13.tar.gz (33.0 kB view hashes)

Uploaded Source

Built Distribution

cdk_eksdistro-2.0.13-py3-none-any.whl (31.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page