Nutanix publishes information for initiatives that help customers integrate the Nutanix platform with other third-party products. Support for these initiatives is handled via the Nutanix community on a best-effort basis. Where open source products are referenced, support is typically provided via GitHub issues in the referenced repositories.
Introduction
In a previous article Karbon and Metrics API: A Practical Guide we have seen how to implement the Prometheus Adapter to expose all the features of the Metrics API (resource metrics, custom metrics, and external metrics APIs).
In some cases like troubleshooting or simple autoscaling needs, a more basic approach may be enough.
With the release of karbon 2.4, internal architecture changes have been made and it is now even easier to install metrics-server
component in a secure way.
Install Kubernetes Metrics Server
Verify the prerequisites
In order to follow this guide, you need an already deployed Karbon Kubernetes cluster.
Once the cluster is deployed, you can download the kubeconfig admin file and install it on your workstation. This can be done from the Prism graphical interface or with the karbon kubectl plugin.
Metrics Server helm chart
The preferred way to install metrics-server on Karbon is to use Helm (v3+).
Helm installation is easy by following the official documentation.
Next you need to add the metrics-server Helm repository and install the metrics-server helm chart with the right options.
helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/ && helm repo update
helm install --wait -n metrics-server --create-namespace metrics-server metrics-server/metrics-server --set replicas=2
For more information or to go deeper in metrics-server settings, visit the official documentation.
Verify metrics-server install
Waiting a few minutes, you should see the pods in the metrics-server
namespace running.
You can also verify if your metrics-server is correctly integrated in the API aggregation layer.
Test the resource Metrics API
Now that your metrics-server component is installed, it is easy to test it with the kubectl top
command.
Conclusion
Through this short article you have seen how extremely simple it is to start using the resources Metrics API as well as troubleshooting.
This can also be a starting point to explore the logic of Horizon Pod Autoscaling mechanism.