:wave::skin-tone-2: hey folks, I am back once more...
# aws
m
👋🏻 hey folks, I am back once more. This time I ran into an issue with
pulumi-eks
. I am trying to create a new node group using createNodeGroup, something like this:
Copy code
const cluster = new eks.Cluster(`my-eks-cluster`, {
      name,
      serviceRole,
      vpcId,
      publicSubnetIds: publicSubnets.ids,
      privateSubnetIds: privateSubnets.ids,
      skipDefaultNodeGroup: true,
      endpointPrivateAccess: true,
      endpointPublicAccess: true,
      authenticationMode: eks.AuthenticationMode.Api,
      accessEntries: {
        instanceRole: {
          principalArn: eksNodeRole.arn,
          type: eks.AccessEntryType.EC2Linux,
        },
      },
      version: '1.33',
    });

    cluster.createNodeGroup(`my-eks-node-group-1`, {
      nodeSecurityGroup: eksNodeSg,
      extraNodeSecurityGroups: [NodeGroup1Sg],
      clusterIngressRule,
      nodeSubnetIds: privateSubnets.ids,
      instanceProfile: profile,
      maxSize: 2,
      minSize: 1,
      desiredCapacity: 1,
    });
and I am getting an issue:
Copy code
+  aws:ec2:LaunchConfiguration my-eks-node-group-1-nodeLaunchConfiguration creating (3s) error:   sdk-v2/provider2.go:566: sdk.helper_schema: creating Auto Scaling Launch Configuration (my-eks-node-group-1-nodeLaunchConfiguration-11f3de6): operation error Auto Scaling: CreateLaunchConfiguration, https response error StatusCode: 400, RequestID: d5e3d2be-563f-45ec-9b26-6f6f1e1687f3, api error UnsupportedOperation: The Launch Configuration creation operation is not available in your account. Use launch templates to create configuration templates for your Auto Scaling groups.: provider=aws@6.79.1
My research pointed out to
createNodeGroup()
use of deprecated
NodeGroup
under the hood. The examples in the examples repo also use the deprecated type. Any guidance on how I should be handling this?
a
You can create a managed node group, and attach it to an eks.
Copy code
cluster = new Cluster("deploy-eks", ClusterArgs.builder().
                ......

        String ng = "deploy-eks-managed-node-group";
        ManagedNodeGroup jenkinsNodeGroup = new ManagedNodeGroup(ng, ManagedNodeGroupArgs.builder()
                .cluster(cluster)
                .diskSize(150)
                .instanceTypes("m7i.4xlarge")
                .nodeGroupName(ng)
                .nodeRole(instanceRole)
                .scalingConfig(NodeGroupScalingConfigArgs.builder()
                        .desiredSize(1)
                        .maxSize(12)
                        .minSize(1)
                        .build())
                .subnetIds(Output.all(vpc.privateSubnetIds().applyValue(ids -> ids.get(0))))
                .tags(App.TAGS)
                .build());
m
oh, interesting, thanks L W, let me try this out!
a
did it work for you?
m
Sorry, took a while to wrangle the permissions I needed to make this happen. But yes, it did work, thank you very much!