Debian 12 bookworm
Sponsored Link

MicroK8s : Enable Metrics Server2023/06/22

Enable Metrics Server add-on to monitor CPU and Memory resources in MicroK8s Cluster.
[1] Deploy Metrics Server on primary Node.
microk8s enable metrics-server

Infer repository core for addon metrics-server
Addon core/metrics-server is already enabled

microk8s kubectl get pods -n kube-system

NAME                                         READY   STATUS    RESTARTS   AGE
dashboard-metrics-scraper-5cb4f4bb9c-hf2tb   1/1     Running   0          80m
kubernetes-dashboard-fc86bcc89-cwsrr         1/1     Running   0          80m
hostpath-provisioner-58694c9f4b-69ghl        1/1     Running   0          55m
metrics-server-7747f8d66b-9d7fl              1/1     Running   0          83m
coredns-7745f9f87f-cvv9j                     1/1     Running   0          80m
calico-kube-controllers-6c99c8747f-cw4jv     1/1     Running   0          104m
calico-node-6qjbd                            1/1     Running   0          87m
calico-node-prlb7                            1/1     Running   0          86m
# [metrics-server] pod has been deployed
[2] To display CPU and Memory resources, run like follows.
microk8s kubectl top node

NAME               CPU(cores)   CPU%   MEMORY(bytes)   MEMORY%      193m         2%     5196Mi          32%   115m         1%     2815Mi          17%

microk8s kubectl top pod

NAME                         CPU(cores)   MEMORY(bytes)
wordpress-559b788c6b-5b86g   4m           154Mi
wordpress-mariadb-0          3m           169Mi
Matched Content