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

How to add preBootstrapCommands in Karpenter NodePool/NodeClass definitions #7492

Open
doverk96 opened this issue Dec 6, 2024 · 1 comment

Comments

@doverk96
Copy link

doverk96 commented Dec 6, 2024

We use eksctl to provision our EKS cluster and node groups. It provides support for preBootstrapCommands which actually runs even before bootstrap script (/etc/eks/bootstrap.sh) runs.

Is there any way to achieve the same functionality in Karpenter ?
I do not want to use custom AMIs.

@edmondceausu
Copy link

If you are using the AMI families, you can specify spec.userData in your NodeClass which will prepend the userData that you specify with the default userData for that AMI family. Karpenter docs has some pretty good examples on this for the different AMI families: https://karpenter.sh/docs/concepts/nodeclasses/#specuserdata

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

No branches or pull requests

2 participants