Skip to content

Instantly share code, notes, and snippets.

@KashifSaadat
Created March 15, 2019 16:40
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KashifSaadat/fd846123fa146b2f874ce440e95c6985 to your computer and use it in GitHub Desktop.
Save KashifSaadat/fd846123fa146b2f874ce440e95c6985 to your computer and use it in GitHub Desktop.
Helpful debugging commands for Kube Reserved Resources & CGroups
# Query current usage for runtime, kubelet and pods
curl -s http://localhost:10255/stats/summary | jq .node.systemContainers
# Quick scan of the cgroup paths to see what does exist
ls -ld /sys/fs/cgroup/**/podruntime.slice
ls -ld /sys/fs/cgroup/**/system.slice
# Validate what cgroup a single process uses
cat /proc/$(pidof kubelet)/cgroup
# Recursively show the contents of a control group
systemd-cgls
# Show top control groups by their resource usage
systemd-cgtop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment