💻 Tech
Kubernetes has a default way to check your system’s memory and CPU consumption through kubectl top nodes or kubectl top pods to retrieve the consumption data for nodes and pods respectively. However, that should be enabled on your cluster first. If you’re using minikube, you can enable it with this command: minikube addons enable metrics-server. Otherwise, you can install the official helm chart: https://artifacthub.io/packages/helm/metrics-server/metrics-server.
If you run the kubectl top command without the metrics server, you will see this message:
error: Metrics API not available