Open rabejens opened 5 years ago
Hi Jens,
I'd suggest taking a look at the spot workers section at https://eksworkshop.com/spotworkers/. The cfn provided in that lab is an updated version, that uses Launch Templates and supports mixed instance policies.
Also, if you are using eksctl, starting from eksctl 1.35, mixed instance policies are supported as well, so you can do something like eksctl create nodegroup -f my_config.yml
Where the cluster config could look something like the following:
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: my-cluster
region: eu-west-1
nodeGroups:
- name: mixed-eksctl-spot
minSize: 1
maxSize: 10
instancesDistribution:
maxPrice: 2
instanceTypes: ["c4.xlarge", "c5.xlarge", "c5d.xlarge"]
onDemandBaseCapacity: 0
onDemandPercentageAboveBaseCapacity: 0
spotInstancePools: 3
labels:
lifecycle: Ec2Spot
myMixedInstanceGroup: clusterAutoScaler
taints:
spotInstance: "true:PreferNoSchedule"
availabilityZones: ["us-west-2a","us-west-2b","us-west-2c"]
iam:
withAddonPolicies:
autoScaler: true
cloudWatch: true
albIngress: true
appMesh: true
xRay: true
Finally if you are considering using EC2 Spot on EKS/K8s, I'd recommend taking a look at this blog post, were Ran, from our team does a good summary of things to consider.
On the back of this, I'll leave this issue open and we will review and update the reference materials in this repo!
I tried to use the
amazon-eks-nodegroup-with-spot.yaml
to provision some EKS nodes. I entered all parameters correctly, but cluster creation fails with:and
I quadruple-checked all values entered ARE indeed numeric.
What am I missing?