Hey there! I’m new to pulumi-- Does anyone know h...
# aws
f
Hey there! I’m new to pulumi-- Does anyone know how to attach a security group to a eks managedNodeGroup? I can’t for the life of me figure out how to do it!
l
Node groups don't have security groups. Each node in a group does. That's configured via the node group's EC2 launch template.
f
I’m trying to setup with spot instances that automatically pull from a list of possible instances, which I don’t think are available on the launch templates
l
I don't enough about EKS to help with that. The thing that creates the instances will be where you configure the security groups.
f
Thanks for trying 🙂
l
What's the thing that creates the instances?
f
its the managedNodeGroup in pulumi
which is whats confusing
(but they accept launch templates…but launch templates dont have spot)
l
No, NodeGroups manage the created instances. EC2 scaling groups create the instances, afaik. Maybe there's another service that does it, too?
f
Maybe?? Its weird because I create the cluster, I set the sizes, spot etc in the managed nodegroup, and it sort of creates the scaling groups etc as well
It seems to apply a default sg…but i can’t seem to figure out how to change that either
l
Yep. If you want more control than EKS gives, you may have to roll your own using ASGs and other low-level constructs 😞
f
yeah sounds like it 😞
l
That's the downside of convention-over-configuration 😞
f
Totally
But im not sure it exposes the “bidding” stuff and multiple nodetypes elsewhere which is kinda odd
c
which provider are you using?
f
aws.provider
c
You need to use launch template. @fancy-eye-62290 And set the following args to use spot instance in launch template: instanceMarketOptions: { marketType: "spot", },
f
Ah got it!!
@cuddly-journalist-77210 Actually im sorry I guess im using the eks provider!
l
The EKS provider is convention-over-configuration. If the conventions it adopts don't suit, then you need to use the AWS provider directly, in order to get the power of configuration.
f
Makes sense! I think I got it all sorted. It looks like you can use the eks manager, and override using a launch template
The next thing I gotta figure out is how to override the autoscaling group
I dont know if you can ovveride the autoscaler though