github地址:https://github.com/sz-wuyanzu/metrics-server.git

拖下来之后直接apply ./

需要注意的是下面三个加号的地方,不加会遇到无法获取源数据的问题,不过我已经修改好了,直接apply

问题回溯,给你们看下:

#error pod logs
I0810 06:39:00.946780       1 heapster.go:71] /metrics-server
I0810 06:39:00.946833       1 heapster.go:72] Metrics Server version v0.2.1
F0810 06:39:00.946840       1 heapster.go:79] Failed to get kubernetes address: No kubernetes source found.

解决:

+++ b/deploy/1.8+/metrics-server-deployment.yaml
@@ -31,6 +31,9 @@ spec:
       - name: metrics-server
         image: gcr.io/google_containers/metrics-server-amd64:v0.2.1
         imagePullPolicy: Always
+        command:
+        - /metrics-server
+        - --source=kubernetes:https://kubernetes.default
         volumeMounts:
         - name: tmp-dir
           mountPath: /tmp
Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐