docs/doc/source/admintasks/kubernetes/kubernetes-admin-tutorials-metrics-server.rst
Juanita-Balaraj ce302b5a0c Standardized Version Updates
Signed-off-by: Juanita-Balaraj <juanita.balaraj@windriver.com>
Change-Id: I1e4208a0f75e6e97422db999317761f8a560d0d4
2021-12-14 16:59:33 -05:00

2.9 KiB

Install Metrics Server

Metrics Server is a scalable, efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.

Metrics Server is meant for autoscaling purposes only. It is not intended to provide metrics for monitoring solutions that persist and analyze historical metrics.

Specifically, in , Metrics Server supports:

  • Use of Kubernetes' horizontal application auto-scaling based on resources consumption, for scaling end users' containerized application deployments.
  • Use of Metrics Server API within end user's containerized applications in order for end user's application to, for example, enable application-specific incoming load management mechanisms based on metrics of selected pods.

For details on leveraging Metrics Server for horizontal autoscaling or for Metrics API, see Kubernetes User Tasks <kubernetes-user-tutorials-metrics-server>. Metrics Server is an optional component of . It is packaged as a system application and included in the installation ISO. In order to enable Metrics Server, you must upload and apply the Metrics Server system application.

Perform the following steps to enable Metrics Server such that its services are available to containerized applications for horizontal autoscaling and/or use of Metrics API.

  1. Go to the path /usr/local/share/applications/helm/ to access metrics-server-nn.nn-0.tgz

  2. Upload the application tarball:

    ~(keystone_admin)]$ system application-upload metrics-server-nn.nn-0.tgz
  3. Run the application list to confirm that it was uploaded:

    ~(keystone_admin)]$ system application-list
  4. Run the application to apply the metrics server:

    ~(keystone_admin)]$ system application-apply metrics-server
  5. Run the application list to confirm it was applied:

    ~(keystone_admin)]$ system application-list
  6. Run the following command to see the pod running:

    ~(keystone_admin)]$ kubectl get pods -l app=metrics-server -n metrics-server

For details on leveraging Metrics Server for horizontal autoscaling or for Metrics API, see Kubernetes User Tasks <kubernetes-user-tutorials-metrics-server>. After installing Metrics Server, the kubectl top command is available to display the metrics being collected by Metrics Server and the ones being used for defined autoscaling definitions. These metrics are also displayed within the Kubernetes Dashboard.

For more information see: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#top