This message was deleted.
s
This message was deleted.
w
Based on my research,
AWS Classic package
has no option of adding, bootstrap commands at all. The best way over here would be to create an AMI based off of Amazon Linux 2 EKS optimized and then add the additional commands here
pulumi_eks
Add newly created NodeGroups to the cluster by following this article maybe? https://aws.amazon.com/premiumsupport/knowledge-center/eks-worker-nodes-cluster/
managed nodegroups in pulumi_eks
Same approach as AWS Classic package. I ve checked out this file from AWS Classic: https://github.com/pulumi/pulumi-aws/blob/master/sdk/go/aws/eks/nodeGroup.go and this from pulumi_eks: https://github.com/pulumi/pulumi-eks/blob/master/nodejs/eks/nodegroup.ts#L832-L920 both places there is no provision to add additional commands to the user data
b
This may be an obvious point, so apologies, would you not do this by creating a custom launch configuration/template and passing it to the node group?
w
That is going to be my next move, creating a custom Launch Template with the EKS AMI commands. I was curious if I was missing something obvious. Also the reason for all the digging was that eksctl allows the user to add additional commands using the
preBootstrapCommands
parameter. Any how thank you for responding and confirming my doubts 🙂
b
Yeah I'd have to look at the AWS API to see how it does it, whether eksctl is just creating a launch template behind the scenes or if this is supported more natively in some way.
w
whether eksctl is just creating a launch template behind the scenes
This is how they do it. Its a part of the CloudFormation template that comes up when they are bringing up the NodeGroup.