Skip to content

Instantly share code, notes, and snippets.

@queil
Created November 26, 2020 10:58
Show Gist options
  • Save queil/72618b8e5116d0c87d4d25e209dca6e5 to your computer and use it in GitHub Desktop.
Save queil/72618b8e5116d0c87d4d25e209dca6e5 to your computer and use it in GitHub Desktop.
Kubernetes: find pod's memory cgroup on the node
# get pod uid
k get po pod-name -o jsonpath='{.metadata.uid}'
# then assuming your pod is burstable then the cgroup will be that:
/sys/fs/cgroup/memory/kubepods.slice/kubepods-burstable.slice{your pod uid with underscores rather than hyphens}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment