Skip to content

Instantly share code, notes, and snippets.

@kincl
Created March 12, 2025 16:30
Show Gist options
  • Save kincl/18a65ddd6cf2b684d4c2cab407ac533b to your computer and use it in GitHub Desktop.
Save kincl/18a65ddd6cf2b684d4c2cab407ac533b to your computer and use it in GitHub Desktop.
Finding the pid limit with cgroupv2 and crio
# get the UID of the running pod and substitute dashes for underscores
POD_UID=$(crictl pods --name dns-default -o json | jq -r '.items[0].metadata.uid' | tr "-" "_")
# check the cgroup contents if it has resource requests:
systemd-cgls /kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod${POD_UID}.slice
# or if it doesn't :o
systemd-cgls /kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-pod${POD_UID}.slice
# check the pid max
cat /sys/fs/cgroup/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod${POD_UID}.slice/pids.max
4096
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment