How to use the @pulumi/eks.createManagedNodeGroup function in @pulumi/eks

To help you get started, we’ve selected a few @pulumi/eks examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pulumi / pulumi-eks / nodejs / eks / examples / managed-nodegroups / index.ts View on Github external
// IAM roles for the node groups.
const role1 = iam.createRole("example-role1");
const role2 = iam.createRole("example-role2");

// Create an EKS cluster.
const cluster = new eks.Cluster("example-managed-nodegroups", {
    skipDefaultNodeGroup: true,
    deployDashboard: false,
    instanceRoles: [role1, role2],
});

// Export the cluster's kubeconfig.
export const kubeconfig = cluster.kubeconfig;

// Create a simple AWS managed node group using a cluster as input.
const managedNodeGroup1 = eks.createManagedNodeGroup("example-managed-ng1", {
    cluster: cluster,
    nodeGroupName: "aws-managed-ng1",
    nodeRoleArn: role1.arn,
}, cluster);

// Create an explicit AWS managed node group using a cluster as input.
const managedNodeGroup2 = eks.createManagedNodeGroup("example-managed-ng2", {
    cluster: cluster,
    nodeGroupName: "aws-managed-ng2",
    nodeRoleArn: role2.arn,
    scalingConfig: {
        desiredSize: 1,
        minSize: 1,
        maxSize: 2,
    },
    diskSize: 20,
github pulumi / pulumi-eks / nodejs / eks / examples / managed-nodegroups / index.ts View on Github external
deployDashboard: false,
    instanceRoles: [role1, role2],
});

// Export the cluster's kubeconfig.
export const kubeconfig = cluster.kubeconfig;

// Create a simple AWS managed node group using a cluster as input.
const managedNodeGroup1 = eks.createManagedNodeGroup("example-managed-ng1", {
    cluster: cluster,
    nodeGroupName: "aws-managed-ng1",
    nodeRoleArn: role1.arn,
}, cluster);

// Create an explicit AWS managed node group using a cluster as input.
const managedNodeGroup2 = eks.createManagedNodeGroup("example-managed-ng2", {
    cluster: cluster,
    nodeGroupName: "aws-managed-ng2",
    nodeRoleArn: role2.arn,
    scalingConfig: {
        desiredSize: 1,
        minSize: 1,
        maxSize: 2,
    },
    diskSize: 20,
    instanceTypes: "t2.medium",
    labels: {"ondemand": "true"},
    releaseVersion: "1.14.7-20190927",
    tags: {"org": "pulumi"},
    version: "1.14",
}, cluster);

@pulumi/eks

Pulumi Amazon Web Services (AWS) EKS Components.

Apache-2.0
Latest version published 13 days ago

Package Health Score

84 / 100
Full package analysis