Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help] Unable to create Managed Node Group from Launch Template #8032

Open
roman5595 opened this issue Nov 4, 2024 · 1 comment
Open

[Help] Unable to create Managed Node Group from Launch Template #8032

roman5595 opened this issue Nov 4, 2024 · 1 comment
Labels
kind/help Request for help

Comments

@roman5595
Copy link

roman5595 commented Nov 4, 2024

What help do you need?

We are migrating from kops cluster to eks cluster and we have to use our custom AMI images, based on these requirements i Think best option is to use EKS managed node group using launch template with custom AMI(I dont want to create new node group and delete old node group everytime we need to change AMI).

I am not able to create managed node group using precreated launch template with correct AMI :

eksctl create nodegroup --name=managed-ng-custom-3 --cluster=my-eks-cluster --region=eu-west-1 --verbose=4

cfg.json =
{
"kind": "ClusterConfig",
"apiVersion": "eksctl.io/v1alpha5",
"metadata": {
"name": "my-eks-cluster",
"region": "eu-west-1",
"version": "1.30"
},
"kubernetesNetworkConfig": {
"serviceIPv4CIDR": "10.100.0.0/16"
},
"iam": {
"withOIDC": false,
"vpcResourceControllerPolicy": true
},
"vpc": {
"id": "vpc-xx",
"cidr": "172.31.0.0/16",
"securityGroup": "sg-xx",
"subnets": {
"public": {
"eu-west-1a": {
"id": "subnet-xx",
"az": "eu-west-1a",
"cidr": "172.31.32.0/20"
},
"eu-west-1b": {
"id": "subnet-xx",
"az": "eu-west-1b",
"cidr": "172.31.0.0/20"
},
"eu-west-1c": {
"id": "subnet-xx",
"az": "eu-west-1c",
"cidr": "172.31.16.0/20"
}
}
},
"sharedNodeSecurityGroup": "sg-xx",
"manageSharedNodeSecurityGroupRules": true,
"autoAllocateIPv6": false,
"nat": {
"gateway": "Single"
},
"clusterEndpoints": {
"privateAccess": false,
"publicAccess": true
}
},
"privateCluster": {
"enabled": false,
"skipEndpointCreation": false
},
"managedNodeGroups": [
{
"name": "managed-ng",
"amiFamily": "AmazonLinux2",
"instanceType": "m5.large",
"desiredCapacity": 2,
"minSize": 2,
"maxSize": 2,
"volumeSize": 80,
"ssh": {
"allow": false,
"publicKeyPath": ""
},
"labels": {
"alpha.eksctl.io/cluster-name": "my-eks-cluster",
"alpha.eksctl.io/nodegroup-name": "managed-ng"
},
"privateNetworking": false,
"tags": {
"alpha.eksctl.io/nodegroup-name": "managed-ng",
"alpha.eksctl.io/nodegroup-type": "managed"
},
"iam": {
"withAddonPolicies": {
"imageBuilder": false,
"autoScaler": false,
"externalDNS": false,
"certManager": false,
"appMesh": false,
"appMeshPreview": false,
"ebs": false,
"fsx": false,
"efs": false,
"awsLoadBalancerController": false,
"albIngress": false,
"xRay": false,
"cloudWatch": false
}
},
"securityGroups": {
"withShared": null,
"withLocal": null
},
"volumeType": "gp3",
"volumeIOPS": 3000,
"volumeThroughput": 125,
"disableIMDSv1": true,
"disablePodIMDS": false,
"instanceSelector": {},
"releaseVersion": ""
}
],
"availabilityZones": [
"eu-west-1c",
"eu-west-1a",
"eu-west-1b"
],
"cloudWatch": {
"clusterLogging": {}
}
}

Manifest :

``apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
name: my-eks-cluster
region: eu-west-1
version: "1.30"

vpc:
id: "vpc-xx"
subnets:
public:
eu-west-1a: { id: "subnet-xx" }
eu-west-1b: { id: "subnet-xx" }
eu-west-1c: { id: "subnet-xx" }

managedNodeGroups:

  • name: managed-ng
    launchTemplate:
    id: lt-1234``

It seems that launchTemplate in this manifest is ignored. Managed node group is successfully created, but it completely ignored pre-created launch template and instead created its own launch template. Am I missing something ?

I tried to deploy managed node group using same launch template with same AMI image and when i used AWS CLI it was deployed without any issues, so i suppose launch template and ami image is not an issue here.

eksctl version
0.194.0

Thank you for help.

@roman5595 roman5595 added the kind/help Request for help label Nov 4, 2024
Copy link
Contributor

github-actions bot commented Nov 4, 2024

Hello roman5595 👋 Thank you for opening an issue in eksctl project. The team will review the issue and aim to respond within 1-5 business days. Meanwhile, please read about the Contribution and Code of Conduct guidelines here. You can find out more information about eksctl on our website

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/help Request for help
Projects
None yet
Development

No branches or pull requests

1 participant