heapster失败:错误信息error: metrics not available yet
来源:1-7 安装dashboard和heapster并验证集群安装结果
慕九州9557276
2018-09-30
老师,在安装heapster时
kubectl get pods -n kube-system执行成果
NAME READY STATUS RESTARTS AGE
coredns-78fcdf6894-gxmvg 1/1 Running 0 22h
coredns-78fcdf6894-vthjl 1/1 Running 0 22h
etcd-k8s1 1/1 Running 0 22h
heapster-86d674b4f7-px58f 1/1 Running 0 2h
kube-apiserver-k8s1 1/1 Running 0 22h
kube-controller-manager-k8s1 1/1 Running 0 22h
kube-proxy-kjxsc 1/1 Running 0 22h
kube-proxy-rhsz5 1/1 Running 0 20h
kube-proxy-wtrdg 1/1 NodeLost 0 21h
kube-scheduler-k8s1 1/1 Running 0 22h
kubernetes-dashboard-767dc7d4d-jspl5 1/1 Running 0 17h
monitoring-grafana-5c948ff858-fcl8n 1/1 Running 0 2h
monitoring-influxdb-86584cb9b7-28tcc 1/1 Running 0 2h
weave-net-864xb 2/2 Running 0 22h
weave-net-9tqln 2/2 NodeLost 0 21h
weave-net-lq8rg 2/2 Running 0 20h
执行kubectl create -f rbac/heapster-rbac.yaml成功
clusterrolebinding.rbac.authorization.k8s.io/heapster created
但是执行kubectl top node返回
error: metrics not available yet
同时发现在新开的ssh窗口执行:kubectl get pods -n kube-system,返回如下:
The connection to the server localhost:8080 was refused - did you specify the right host or port?
怀疑是dns有问题,请问应该如何查找问题,如何解决呢?
写回答
1回答
-
tonybai
2018-09-30
我想这里有两个问题:
1. metrics not available yet
- heapster安装后,需要等待一段时间才会有metrics数据进来。这之前都会返回"metrics not available yet"的提示信息2. kubectl get pods命令失败
- 你可以看一下当前节点上的KUBECONFIG是否配置正确了。从你报错的日志来看,应该是没有正确配置KUBECONFIG,这样kubectl默认通过localhost:8080端口访问apiserver的insecure port012018-10-08
相似问题