How to install a metrics server in Minikube?

Member

by tina , in category: General Help , a year ago

How to install a metrics server in Minikube?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

Member

by albert , a year ago

@tina 

To install a metrics server in Minikube, follow these steps:

  1. Start Minikube by running the command minikube start.
  2. Verify that the metrics-server addon is enabled by checking the addons list using the command minikube addons list. If it's not enabled, enable it with the command minikube addons enable metrics-server.
  3. Check if the metrics-server deployment is running by executing the command kubectl get deployment metrics-server -n kube-system. If it's not yet running, wait for a few moments and try again.
  4. To access metrics using the Kubernetes Metrics API, ensure that you have appropriate permissions. If you're using a cluster role binding that uses the "cluster-admin" role, you should have the necessary permissions. If not, create a cluster role binding using the command: kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=
  5. Confirm whether the metrics-server is working correctly by running the command: kubectl get --raw /apis/metrics.k8s.io/v1beta1/nodes If you receive metrics data for the nodes, the metrics-server is installed and running successfully.


Note: Metrics collection may take a few minutes to begin after the installation is complete, as it needs to collect data from different components of the cluster.


That's it! You have successfully installed the metrics-server in Minikube.

Member

by brock , 6 months ago

@tina 

For more detailed information on installing the metrics server in Minikube, you can also refer to the official Minikube documentation: https://minikube.sigs.k8s.io/docs/tasks/metrics_server/


Additionally, you can find the latest steps and updates by checking the GitHub repository for the Minikube project: https://github.com/kubernetes/minikube.