1. an eks cluster

    TypeScript
    import * as eks from "@pulumi/eks"; // Create an EKS cluster const cluster = new eks.Cluster("my-cluster", { desiredCapacity: 2, minSize: 1, maxSize: 3, storageClasses: "gp2", deployDashboard: false, }); // Export the clusters' kubeconfig. export const kubeconfig = cluster.kubeconfig;


  2. add an awsx vpc

    TypeScript
    import * as awsx from "@pulumi/awsx"; // Create a new VPC with default settings const vpc = new awsx.ec2.Vpc("custom-vpc", {}); // Export the VPC id export const vpcId = vpc.id; // Export the VPC public subnets export const publicSubnetIds = vpc.publicSubnetIds;


  3. add an eks cluster

    TypeScript
    import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws"; import * as awsx from "@pulumi/awsx"; import * as eks from "@pulumi/eks"; // Create a VPC for our cluster const vpc = new awsx.ec2.Vpc("my-vpc", {}); // Create the EKS cluster itself, including a "gp2"-backed StorageClass and a default VPC const cluster = new eks.Cluster("my-cluster", { vpcId: vpc.id, subnetIds: vpc.publicSubnetIds, instanceType: "t2.medium", desiredCapacity: 2, minSize: 1, maxSize: 2, storageClasses: "gp2", deployDashboard: false, }); // Export the cluster's kubeconfig. export const kubeconfig = cluster.kubeconfig;