kubernetes autoscale无法获取指标(heapster已安装在kube-system命名空间中)

时间:2016-06-24 20:17:37

标签: scale kubernetes heapster

我创建了一个带有vagrant和centos 7的迷你集群。我设法安装kube-dns和heapster但是当我尝试使用php-apache示例测试自动缩放时它不起作用。

failed to get CPU consumption and request: failed to unmarshall heapster response: invalid character 'E' looking for beginning of value

这很奇怪,因为我可以看到使用grafana和限制的指标。我的kube-dns和我的heapster在kube-system命名空间中,所以它应该可以工作。

我有kubernetes 1.2,如果有人可以帮助那将是非常棒的。

以下是heapster的日志:

[vagrant@localhost ~]$ kubectl logs --namespace=kube-system heapster-xzy31
I0625 11:08:50.041788       1 heapster.go:65] /heapster --source=kubernetes:http://192.168.50.130:8080?inClusterConfig=false&useServiceAccount=true&auth= --sink=influxdb:http://monitoring-influxdb:8086
I0625 11:08:50.042310       1 heapster.go:66] Heapster version 1.1.0
I0625 11:08:50.090679       1 configs.go:60] Using Kubernetes client with master "http://192.168.50.130:8080" and version v1
I0625 11:08:50.090705       1 configs.go:61] Using kubelet port 10255
E0625 11:09:00.097603       1 influxdb.go:209] issues while creating an InfluxDB sink: failed to ping InfluxDB server at "monitoring-influxdb:8086" - Get http://monitoring-influxdb:8086/ping: dial tcp: lookup monitoring-influxdb on 10.254.0.10:53: read udp 172.17.39.2:38757->10.254.0.10:53: read: connection refused, will retry on use
I0625 11:09:00.097624       1 influxdb.go:223] created influxdb sink with options: host:monitoring-influxdb:8086 user:root db:k8s
I0625 11:09:00.097638       1 heapster.go:92] Starting with InfluxDB Sink
I0625 11:09:00.097641       1 heapster.go:92] Starting with Metric Sink
I0625 11:09:00.103486       1 heapster.go:171] Starting heapster on port 8082
I0625 11:10:05.003399       1 manager.go:79] Scraping metrics start: 2016-06-25 11:09:00 +0000 UTC, end: 2016-06-25 11:10:00 +0000 UTC
E0625 11:10:05.003479       1 kubelet.go:279] Node 192.168.50.131 is not ready
I0625 11:10:05.051081       1 manager.go:152] ScrapeMetrics: time: 47.581507ms size: 70
I0625 11:10:05.060501       1 influxdb.go:201] Created database "k8s" on influxDB server at "monitoring-influxdb:8086"
I0625 11:11:05.001120       1 manager.go:79] Scraping metrics start: 2016-06-25 11:10:00 +0000 UTC, end: 2016-06-25 11:11:00 +0000 UTC
I0625 11:11:05.091844       1 manager.go:152] ScrapeMetrics: time: 90.657932ms size: 132

1 个答案:

答案 0 :(得分:0)

好的,我找到了解决方案,我的群集存在缺陷。我不得不在主人身上安装法兰绒。使用选项--iface = eth1因为流浪。

我遵循了这个指南http://severalnines.com/blog/installing-kubernetes-cluster-minions-centos7-manage-pods-services,但他们没有说要在主人身上安装法兰绒。

现在一切正常。