Open Source
All templates and components

Cluster component

Kubernetes Metrics Server

Shows the CPU and memory each pod uses right now.

Memory when idle
about 20 MiB
CI measures it once the app is ready and before any traffic. Leave room for more.
Tested on
x86 and ARM servers
Installed by default
Recommended

Introduction

Kubernetes Metrics Server serves the metrics.k8s.io API with the CPU and memory each Pod and node uses right now. It collects the numbers from the kubelets every 15 seconds. It keeps no history, so it is the cheapest source of live usage.

Install it for the live usage in Zeabur OSS, for kubectl top and for autoscaling. The Horizontal Pod Autoscaler stops while the API is down. On several nodes it runs two replicas with a PodDisruptionBudget, so one stays up while a node drains.

It reads Pods, nodes and namespaces and the kubelet’s node metrics, and it registers an aggregated API. It adds a NetworkPolicy that lets the API server reach it on port 10250. It runs under the restricted Pod Security level.

Use it

In Zeabur OSS, a service’s Usage tab shows Current usage from this API. Without it, the tab offers Install. See View logs, events, and usage, and open a terminal.

Check it with kubectl:

kubectl top pods -A

Remove it

Removal deletes the metrics API. kubectl top, the live usage in Zeabur OSS and autoscaling then have no data. Zeabur OSS refuses to remove it while another installed component, such as the Vertical Pod Autoscaler, needs it. See Remove components.

Troubleshooting

kubectl top says the metrics API is not available

Check that the API is available and that the Pods are ready:

kubectl get apiservice v1beta1.metrics.k8s.io
kubectl -n kube-system get pods -l app.kubernetes.io/name=metrics-server

Technical details

This release

Provides
metrics
Licence
Apache-2.0
Homepage
github.com

Tested in CI

CI installs these exact files on a new cluster, waits until they are ready, then records the idle memory.

DistributionPlatformKubernetesPassedIdle memory
k3slinux/amd64v1.37.217 MiB
k3slinux/arm64v1.37.217 MiB
kindlinux/amd64v1.37.017 MiB
kindlinux/arm64v1.37.017 MiB
kubesololinux/amd64v1.36.618 MiB
kubesololinux/arm64v1.36.617 MiB
rke2linux/amd64v1.37.217 MiB
rke2linux/arm64v1.37.217 MiB

Security

Reads kubelet metrics; registers an aggregated API.

What it installs

  • metrics-server 3.14.0