Skip to content

Support BYO (Bring Your Own) launch template for EKS managed node groups #5896

@AmitSahastra

Description

@AmitSahastra

/kind feature

Describe the solution you'd like

EKS allows creating a node group with an existing launch template (by ID + version). CAPA today only supports launch templates that it creates and manages; there is no way to reference a pre-existing launch template for use with an EKS managed node group.

Proposed behavior: Add an id field to the existing AWSLaunchTemplate struct. When awsLaunchTemplate.id is set on an AWSManagedMachinePool, CAPA treats the launch template as BYO (Bring Your Own):

  • The ID is passed directly to the EKS CreateNodegroup/UpdateNodegroupVersion API
  • CAPA does not create, update, or delete the launch template
  • awsLaunchTemplate.versionNumber can be set to pin a specific version, and is mutable to allow rolling out new versions
  • On pool deletion, only the node group is deleted; the launch template is left unchanged
  • CAPA-managed fields (AMI, instanceType, rootVolume, sshKeyName, imageLookup*, etc.) are rejected by webhook validation when id is set, since the user manages the template contents externally

Anything else you would like to add:

Use case: Users who already have a launch template (e.g. from another tool, console, or Terraform) want to use it with CAPA-managed node groups without CAPA creating or modifying that template.

Current behavior: When spec.awsLaunchTemplate is set, the controller always creates and manages a launch template by a derived name ({control-plane-name}-{pool-name}). There is no way to reference an existing launch template by ID.

Example spec:

spec:
  awsLaunchTemplate:
    id: "lt-0abcd1234efgh5678"
    versionNumber: 3

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.needs-priorityneeds-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions