Then I created another node group using the same options but without --launch-template. Comparing the launch templates of the underlying Auto Scaling Groups I found the following differences:
If you don't specify your own launch template to use when creating a managed node group, the Amazon EKS API creates a launch template with default values in your account.
Based on the above I have the following questions:
I would expect the only difference to be the BlockDeviceMappings. Why do are we seeing more?
What are the "default values" that EKS uses when creating launch templates?
In the default configuration, EKS sets HttpPutResponseHopLimit=2 which means that pods can assume the IAM role of the worker node. Shouldn't this be disabled by default?
Is it possible to have a custom launch template and have exactly the same outcome with the default one?
Are you currently working around this issue?
In my custom launch template I include the MetadataOptions that EKS uses along with my BlockDeviceMapping.
Additional context
I used an 1.17 EKS cluster and awscli 2.2.35.
I would like to understand the default template specification too. Ideally I want to somehow "extend" the default template with my custom template specification. I am using CloudFormation.
Community Note
Tell us about your request
Extend EKS Launch template support guide to include the default launch template that EKS uses.
Which service(s) is this request for? EKS
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
I am trying to create a managed node group with an extra EBS disk. Based on https://github.com/aws/containers-roadmap/issues/1199#issuecomment-748296234, I created a launch template with only
BlockDeviceMappings
in its launch template data. Here is the launch template data I used:Then I created the node group using
--launch-template
:Then I inspected the generated launch template of the underlying ASG:
--launch-template
. Comparing the launch templates of the underlying Auto Scaling Groups I found the following differences:"NetworkInterfaces": [{"DeviceIndex": 0, "Groups": ["sg-...."]}]
"SecurityGroupIds": ["sg-..."]
"TagSpecifications": [{..."Tags":[{"key": "eks:cluster-name"..."key": "eks:nodegroup-name"}
"MetadataOptions": {"HttpPutResponseHopLimit": 2}
Copying from docs:
Based on the above I have the following questions:
BlockDeviceMappings
. Why do are we seeing more?HttpPutResponseHopLimit=2
which means that pods can assume the IAM role of the worker node. Shouldn't this be disabled by default?Are you currently working around this issue? In my custom launch template I include the
MetadataOptions
that EKS uses along with myBlockDeviceMapping
.Additional context I used an 1.17 EKS cluster and awscli 2.2.35.
Attachments None.