For Droplets created before 2 October 2024, you must manually add VPC peering routes to interconnect with VPC-native DOKS clusters
Why do kubectl top and DigitalOcean Control Panel show different metrics values for worker nodes?
Validated on 19 Jul 2022 • Last edited on 29 Mar 2024
The performance metrics displayed in the DigitalOcean Control Panel are calculated using all anonymous (non-file backed) memory since DigitalOcean Kubernetes does not support the use of swap memory. Because the host OS cannot always reclaim cached (file-backed) memory, the metrics typically also include such pages.
The output of the kubectl top
command does not measure the entire system load in the same way the control panel does. It only sums up all use of containers on that host but there may be processes on a host outside of the cgroups hierarchy, which can cause the output to be different from the control panel. The Metrics Server itself doesn’t calculate any metrics, it aggregates values exposed by kubelet
and exposes them in the API to be used for autoscaling.
kubectl top
is for exporting metrics from resource metrics pipeline and is not meant to be an accurate tool that would replace monitoring solutions or running top
on node.
Related Topics
Health checks often fail due to firewalls or misconfigured backend server software.
Enable DNS caching, use non-shared machine types for the cluster, and scale out or reduce DNS traffic.