[root@node-k8s-02 ~]# docker pull registry.cn-beijing.aliyuncs.com/google_registry/metrics-server-amd64:v0.3.6
v0.3.6: Pulling from google_registry/metrics-server-amd64
e8d8785a314f: Already exists 
b2f4b24bed0d: Already exists 
Digest: sha256:c9c4e95068b51d6b33a9dccc61875df07dc650abbf4ac1a19d58b4628f89288b
Status: Downloaded newer image for registry.cn-beijing.aliyuncs.com/google_registry/metrics-server-amd64:v0.3.6
registry.cn-beijing.aliyuncs.com/google_registry/metrics-server-amd64:v0.3.6
[root@node-k8s-02 ~]# docker tag  registry.cn-beijing.aliyuncs.com/google_registry/metrics-server-amd64:v0.3.6  k8s.gcr.io/metrics-server-amd64:v0.3.6
[root@node-k8s-02 ~]# docker rmi  registry.cn-beijing.aliyuncs.com/google_registry/metrics-server-amd64:v0.3.6
Untagged: registry.cn-beijing.aliyuncs.com/google_registry/metrics-server-amd64:v0.3.6
Untagged: registry.cn-beijing.aliyuncs.com/google_registry/metrics-server-amd64@sha256:c9c4e95068b51d6b33a9dccc61875df07dc650abbf4ac1a19d58b4628f89288b
 

[root@node-k8s-01 config]# helm repo add stable http://mirror.azure.cn/kubernetes/charts
"stable" has been added to your repositories 

 [root@node-k8s-01 config]# cat metrics-server.yaml
args:
- --logtostderr
- --kubelet-insecure-tls
- --kubelet-preferred-address-types=InternalIP

[root@node-k8s-01 config]# helm install  metrics-server stable/metrics-server --version 2.11.1 -n kube-system -f metrics-server.yaml
NAME: metrics-server
LAST DEPLOYED: Thu Nov 11 15:34:59 2021
NAMESPACE: kube-system
STATUS: deployed
REVISION: 1
NOTES:
The metric server has been deployed. 

In a few minutes you should be able to list metrics using the following
command:

  kubectl get --raw "/apis/metrics.k8s.io/v1beta1/nodes"
 

 

Logo

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

更多推荐