我正在使用 eksctl 创建 EKS 集群。在为底层资源开发 yaml 配置时,我了解到 AWS EKS 集群也支持 Spot 实例(here)。然而,在参考文档/架构时,我没有发现任何限制现货实例投标价格的内容。因此,默认情况下,它将以按需定价出价,这并不理想。我在这里错过了什么还是目前不可能?
spot 的示例 yaml 配置(cluster-config-spot.yaml)-
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: spot-cluster
region: us-east-2
version: "1.23"
managedNodeGroups :
- name: spot-managed-node-group-1
instanceType: ["c7g.xlarge","c6g.xlarge"]
minSize: 1
maxSize: 10
spot: true
AWS EKS 集群创建命令 -
eksctl create cluster -f cluster-config-spot.yaml
如此处所述,使用 AWS Karpenter 管理 EKS 的 Spot 实例不是更好吗
将 Amazon EC2 Spot 实例与 Karpenter 结合使用
特别是这个策略?
我还写了一篇博客这里,如何配置一切,希望对你有帮助。