Support Kubernetes Secret references for EC2NodeClass userData

Author: benturnkeyCreated Aug 3, 2026Updated Sep 9, 2026
Labelsfeaturetriage/acceptedpriority/important-longterm

Description

What problem are you trying to solve?

EC2NodeClass.spec.userData currently only accepts an inline string. This requires the complete user-data payload to be stored in the EC2NodeClass, which is commonly committed to git and deployed as a non-secret k8s resource.

We'd like to get user data from a key in a k8s secret. This would allow user-data content to be managed through existing tooling such as External Secrets without copying the resolved value into the EC2NodeClass manifest.

Something like:

yaml
  spec:
    userDataRef:
      name: bottlerocket-user-data
      key: userData

How important is this feature to you?

We can't use karpenter without something like this

Happy to contribute to implementing the feature as we're testing it internally.

Give me 1 and I'll submit a PR

  • Please vote on this issue by adding a reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Source: aws/karpenter-provider-aws