Skip to main content

CDKTF construct library for Amazon EKS

Project description

npm version PyPI version release construct hub

cdktf-aws-eks

CDKTF construct library for Amazon EKS.

Usage

The following sample creates:

  1. A new VPC
  2. Amazon EKS cluster(control plane)
  3. The default nodegroup with the cluster
  4. The 2nd nodegroup with spot instances
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from pahud.cdktf_aws_eks import Cluster

# create the cluster and the default nodegroup
cluster = Cluster(stack, "demo-cluster",
    version=KubernetesVersion.V1_21,
    scaling_config={"min_capacity": 1}
)

# create the optional 2nd nodegroup
cluster.add_node_group("NG2",
    scaling_config={
        "min_capacity": 1,
        "max_capacity": 10,
        "desired_capacity": 5
    },
    capacity_type=CapacityType.SPOT,
    instance_types=["t3.large", "c5.large", "m5.large"]
)

Existing VPC subnets

To deploy in any existing VPC, specify the privateSubnets and publicSubnets(if any).

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
Cluster(stack, "demo-cluster",
    private_subnets=["subnet-111", "subnet-222", "subnet-333"],
    public_subnets=["subnet-444", "subnet-555", "subnet-666"],
    version=KubernetesVersion.V1_21
)

Project details


Download files

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

Source Distribution

pahud-cdktf-aws-eks-0.3.0.tar.gz (73.3 kB view hashes)

Uploaded Source

Built Distribution

pahud_cdktf_aws_eks-0.3.0-py3-none-any.whl (72.2 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