Metadata-Version: 2.1
Name: cdk-eksdistro
Version: 0.0.168
Summary: AWS CDK construct library for Amazon EKS Distro
Home-page: https://github.com/pahud/cdk-eksdistro.git
Author: Pahud Hsieh<pahudnet@gmail.com>
License: Apache-2.0
Project-URL: Source, https://github.com/pahud/cdk-eksdistro.git
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: JavaScript
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Typing :: Typed
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

[![NPM version](https://badge.fury.io/js/cdk-eksdistro.svg)](https://badge.fury.io/js/cdk-eksdistro)
[![PyPI version](https://badge.fury.io/py/cdk-eksdistro.svg)](https://badge.fury.io/py/cdk-eksdistro)
![Release](https://github.com/pahud/cdk-eksdistro/workflows/Release/badge.svg)

# `cdk-eksdistro`

CDK construct library that allows you to create [Amazon EKS Distro](https://distro.eks.amazonaws.com/) 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](https://snapcraft.io/eks) from the `UserData`.

# Sample

```python
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
imoprtClusterfrom"cdk-eksdistro"

app = cdk.App()

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

stack = cdk.Stack(app, "eksdistro-stack", env=env)

Cluster(stack, "Cluster")
```

## Spot Instance

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

```python
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
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.

![](https://pbs.twimg.com/media/EsEgnhoVoAIHnkr?format=jpg&name=4096x4096)

# Reference

* https://aws.amazon.com/blogs/opensource/introducing-amazon-eks-distro/
* https://ubuntu.com/blog/install-amazon-eks-distro-anywhere
* https://microk8s.io/
* https://snapcraft.io/microk8s


