https://pulumi.com logo
#general
Title
# general
h

hundreds-lizard-14182

05/11/2020, 3:44 PM
Hello All! Is there an option to provision an EKS cluster with AWS managed node group (managed by AWS)? E.g., similar to
eksctl create cluster --managed
?
b

bland-lamp-16797

05/11/2020, 3:48 PM
you can call this terraform API with pulumi, I think it is identical with
eksctl --managed
https://www.terraform.io/docs/providers/aws/r/eks_node_group.html
b

billowy-army-68599

05/11/2020, 3:52 PM
are you using the eks module?
👍 1
b

bland-lamp-16797

05/11/2020, 3:56 PM
ohhh I just learned there is a actual module... https://github.com/pulumi/pulumi-eks nice!
h

hundreds-lizard-14182

05/11/2020, 5:04 PM
yep, it is an EKS module. I am browsing the API, was hoping to see options for managed node groups in nodegroup options. I admit, i could be simply missing something. Or it is not supported yet.
b

billowy-army-68599

05/11/2020, 5:27 PM
@hundreds-lizard-14182 can you show me how you're currently building your cluster? depending on the dependency you're using, there are better ways to do it?
h

hundreds-lizard-14182

05/11/2020, 5:28 PM
it is a very simple setup:
Copy code
import * as eks from "@pulumi/eks";


const cluster = new eks.Cluster("my-cluster", {
  desiredCapacity: 1,
  minSize: 1,
  maxSize: 2,
  nodeGroupOptions:{
    
  },
  instanceType: "t3.2xlarge",
  deployDashboard: true,
  enabledClusterLogTypes: [
    "api",
    "audit",
    "authenticator",
  ],
});

export const kubeconfig = cluster.kubeconfig;
My objective is to create a managed node group here. That node group is maintained by AWS (all worker nodes) but I want to control scaling.
b

billowy-army-68599

05/11/2020, 5:34 PM
we have
createdManagedNodeGroup
https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/eks/#createManagedNodeGroup I'll need to construct an example if you need help, but I believe you should be able to do
cluster.createdManagedNodeGroup
👍 1