Hey guys, I want to create an eks nodepool that wi...
# aws
b
Hey guys, I want to create an eks nodepool that will have spot ec2 instances for my development environment. This is what i’m trying to do, and for some reason failing to achieve my goal. This is how I fetch the spot price:
Copy code
let spotPrice = aws.ec2.getSpotPriceOutput({instanceType: eksInstanceType}).get()
and this is the cluster node-pool options:
Copy code
{
        instanceType: instanceType,
        desiredCapacity:desiredCapacity,
        minSize: minSize,
        maxSize: maxSize,
        ...(spotPrice) && {spotPrice: spotPrice},

    }
The error that I get is pretty clear, I need to add more filter to the getSpotPriceOutput function. I wonder whether there’s a better way to set the spot price instead of fetching the live spot price, can’t I just set the nodepool to be Spot, without configuring the price ? Thanks guys 🙂