This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Metrics Server

Deploy a Metrics Server for autoscaling capabilities.

    Requirements

    • An EKS cluster is provisioned.

    • The cluster is connected and the kubeconfig is properly configured.

    Run the following command to connect a local environment to the EKS cluster.

    aws eks update-kubeconfig --region <region> --name <cluster-name>
    

    Installing the Component

    cd helm/metrics-server
    helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server || true
    helm repo update
    helm dependency build
    helm install metrics-server . \
      --namespace kube-system \
      --create-namespace
    

    For any custom configuration changes, create a values-override.yaml file and add -f values-override.yaml to the helm install command. It is not recommended to modify the configurations in the values.yaml file.

    Verifying the Installation

    Check that the Metrics Server deployment is ready:

    kubectl get deployment metrics-server -n kube-system
    

    Sample output.

    NAME             READY   UP-TO-DATE   AVAILABLE   AGE
    metrics-server   1/1     1            1           ...
    

    Run the following command to verify that node metrics are available.

    kubectl top nodes
    

    Uninstalling the Component

    Run the following command to uninstall the Metrics Server:

    helm uninstall metrics-server \
      --namespace kube-system