我的环境:
当我的豆荚闲置或流量不足时,一切都很好。我的HPA可以从heapster中获取数据,我可以看到grafana上的数据,将其从Influxdb中删除。
当我开始加载测试一个pod(将它置于一些流量下,从10 rqs /秒开始)时,我停止获取有关grafana中的CPU使用情况的信息,HPA开始得到这个:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedGetResourceMetric 2m (x13 over 3h) horizontal-pod-autoscaler unable to get metrics for resource cpu: no metrics returned from heapster
Warning FailedComputeMetricsReplicas 2m (x13 over 3h) horizontal-pod-autoscaler failed to get cpu utilization: unable to get metrics for resource cpu: no metrics returned from heapster
加载完成后,我几乎立即在Influxdb和HPA中恢复了我的CPU指标。 请注意,在同一时期,我从未丢失有关内存使用情况的数据。
非常感谢任何有关故障排除和/或解决此问题的帮助。
对于记录,我还在heapster的github上发布了一个问题:https://github.com/kubernetes/heapster/issues/1937