【发布时间】:2017-03-22 07:35:21
【问题描述】:
我通过kops在aws上创建了一个k8s集群,节点自动伸缩组配置如下:
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 节点来扩展集群?任何答案都非常感谢
【问题讨论】:
标签: amazon-web-services kubernetes