gpt4 book ai didi

amazon-web-services - cluster-autoscaler无法扩展kubernetes集群

转载 作者:行者123 更新时间:2023-12-02 12:22:59 25 4
gpt4 key购买 nike

我在k8s上通过kops创建了aws集群,节点自动缩放组配置如下:

metadata:
creationTimestamp: "2017-03-21T03:53:26Z"
name: nodes
spec:
associatePublicIp: true
image: kope.io/k8s-1.4-debian-jessie-amd64-hvm-ebs-2016-10-21
machineType: t2.medium
maxSize: 5
minSize: 2
role: Node
zones:
- us-west-1a
- us-west-1c
aws控制台显示当前asg,例如:
desired:2; min:2; max:5

然后我使用 official doc安装 add-ons --- cluster-autoscaler,然后部署一个Pod,当前集群无法提供资源,但是 cluster-autoscaler不会将节点添加到集群,日志如下所示:
admin@ip-10-0-52-252:/var/log$kubectl logs -f cluster-autoscaler-1581749901-fqbzk -n kube-system
I0322 07:08:43.407683 1 event.go:216] Event(api.ObjectReference{Kind:"Pod", Namespace:"default", Name:"new-mq-test-951523717-trd2s", UID:"9437ac54-0ecd-11e7-8779-0257a5d4c012", APIVersion:"v1", ResourceVersion:"189546", FieldPath:""}): type: 'Normal' reason: 'NotTriggerScaleUp' pod didn't trigger scale-up (it wouldn't fit if a new node is added)
I0322 07:08:43.407910 1 event.go:216] Event(api.ObjectReference{Kind:"Pod", Namespace:"default", Name:"new-mq-test-951523717-n986l", UID:"9437a3db-0ecd-11e7-8779-0257a5d4c012", APIVersion:"v1", ResourceVersion:"189543", FieldPath:""}): type: 'Normal' reason: 'NotTriggerScaleUp' pod didn't trigger scale-up (it wouldn't fit if a new node is added)

那么,为什么 cluster-autoscaler无法通过添加ec2节点来扩展集群呢?任何答案都非常感谢

最佳答案

最终我找到了答案,我的默认kops asg的nodes配置是t2.medium,而我部署了需要5000M进行存储的Pod,因为我们所有的kont t2.medium内存都是4GB,它不能满足要求,所以cluster-autoscaler不能放大!

关于amazon-web-services - cluster-autoscaler无法扩展kubernetes集群,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42945390/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com