Installing the Kubernetes Metrics Server
The Kubernetes Metrics Server is an aggregator of resource usage data in your cluster, and
it is not deployed by default in Amazon EKS clusters. For more information, see Kubernetes Metrics
Server
Don't use Metrics Server when you need an accurate source of resource usage metrics or as a monitoring solution.
Deploy the Metrics Server
-
Download the manifest with the following command:
curl -O https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
-
View the manifest file or files that you downloaded and note the name of the image. Download the image locally with the following command.
docker pull image:
tag
-
Tag the image to be pushed to an Amazon Elastic Container Registry repository in China with the following command.
docker tag image:
tag
111122223333
.dkr.ecr.cn-north-1
.amazonaws.com.cn/image:tag
-
Push the image to a China Amazon ECR repository with the following command.
docker push image:
tag
111122223333
.dkr.ecr.cn-north-1
.amazonaws.com.cn/image:tag
-
Update the Kubernetes manifest file or files to reference the Amazon ECR image URL in your Amazon Web Services Region.
-
Apply the modified manifest to your cluster with the following command:
kubectl apply -f components.yaml
-
Verify that the
metrics-server
deployment is running the desired number of pods with the following command.kubectl get deployment metrics-server -n kube-system
The example output is as follows.
NAME READY UP-TO-DATE AVAILABLE AGE metrics-server 1/1 1 1 6m