Skip to content

Instantly share code, notes, and snippets.

@giuseppe
Created July 5, 2019 20:52
Show Gist options
  • Save giuseppe/a1a582a892d61f1a55f4650702c33a79 to your computer and use it in GitHub Desktop.
Save giuseppe/a1a582a892d61f1a55f4650702c33a79 to your computer and use it in GitHub Desktop.
Note for cgroups v2 Kubernetes

Enable cgroups v2

# grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=1"
# cat /etc/systemd/system/enable-cgroups.service 
[Service]
ExecStart=/bin/sh -c 'echo "+io +cpu +memory +pids +cpuset" > /sys/fs/cgroup/cgroup.subtree_control; mkdir /sys/fs/cgroup/user.slice; echo "+io +cpu +memory +pids +cpuset" > /sys/fs/cgroup/user.slice/cgroup.subtree_control'
Type=oneshot

[Install]
WantedBy=multi-user.target

Components

To vendor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment