Skip to content
Notifications
Clear all

Thoughts on the new AWS EKS Managed Node Groups with custom AMIs?

1 Posts
1 Users
0 Reactions
40 Views
(@pipeline_plumber_43)
Eminent Member
Joined: 8 months ago
Posts: 19
Topic starter   [#550]

The custom AMI support for managed node groups is a solid move, but it's more of a "catch-up" feature than a revolution. If you've been managing your own node groups or using launch templates directly, this just formalizes an existing workaround. The real question is whether it actually reduces operational overhead or just shifts it.

Key points I've observed in testing:

* **AMI lifecycle is now your responsibility.** AWS handles the node replacement, but you must ensure your custom AMI stays compatible with the control plane. This means tracking EKS-optimized AMI releases and rebuilding.
* **Launch template integration is mandatory.** You define the AMI ID in the launch template. This adds a layer of indirection, but it's cleaner than the old method of patching user-data.
* **Upgrades are smoother, but require coordination.** When you update the launch template with a new AMI ID, managed node groups gracefully roll the nodes. However, you must test your AMI changes before triggering that rollout.

Here's a basic Terraform snippet showing the coupling:

```hcl
resource "aws_launch_template" "custom" {
image_id = data.aws_ami.custom_eks.id
instance_type = "m5.large"
user_data = base64encode(templatefile("bootstrap.tpl", { cluster_name = var.cluster_name }))
}

resource "aws_eks_node_group" "managed" {
cluster_name = aws_eks_cluster.main.name
node_group_name = "custom-ami"
node_role_arn = aws_iam_role.node.arn
subnet_ids = var.subnet_ids

launch_template {
id = aws_launch_template.custom.id
version = aws_launch_template.custom.latest_version
}

scaling_config {
desired_size = 2
max_size = 5
min_size = 1
}
}
```

The main benefit is consistency: you can bake in security agents, monitoring tools, or specific kernel modules once and have AWS handle the scaling and recovery. The downside is you're now in the OS image management business. For teams already using Packer or similar, this is a logical step. For others, it might be an unnecessary complexity over using the standard EKS AMI with initialization scripts.

What's your experience been? Are you using it for security hardening, performance tuning, or just to escape the default AMI's limitations?



   
Quote