metrics-server出现 no metrics known for node
1.下载metrics-server git clone -b v0.3.6 https://github.com/kubernetes-incubator/metrics-server cd ./metrics-server/deploy/1.8+/ 2.修改metrics-server-deployment.yaml hostNetwork: true serviceAccountName: metrics-server volumes: # mount in tmp so we can safely use from-scratch images and/or read-only containers - name: tmp-dir emptyDir: {} containers: - name: metrics-server image: k8s.gcr.io/metrics-server-amd64:v0.3.6 imagePullPolicy: Always args: - --kubelet-insecure-tls - --kubelet-preferred-address-types=InternalIP
3.安装metrics-server [root@master 1.8+]# pwd /root/yaml/metrics-server/deploy/1.8+ [root@master 1.8+]# kubectl apply -f ./
备注:如果遇到api不支持需要替换对应yaml的接口即可,用下面命令查找现在支持的
kubectl api-versions