我创建了一个带有Vagrant和Centos 7的迷你群集。我设法安装了Kube-DNS和HEAPSTER,但是当我尝试使用PHP-Apache示例测试AutoScale时,它无效。<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
failed to get CPU consumption and request: failed to unmarshall heapster response: invalid character 'E' looking for beginning of value
这很奇怪,因为我可以看到带有Grafana和极限的指标。我的kube-dns和我的堆位于kube-system命名空间中,因此应该起作用。
我有Kubernetes 1.2,如果有人可以提供帮助。
这是堆的日志:
[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
好吧,我找到了解决方案,我的群集有缺陷。我也必须在主人上安装法兰绒。使用选项-iface = eth1,因为Vagrant。
我遵循本指南http://severalnines.com/blog/installing-kubernetes-cluster-minions-centos7-manage-pods-services,但他们没有说要在师父上安装法兰绒。
现在一切都在起作用。