• Akihiro Suda's avatar
    rootless: enable resource limitation (requires cgroup v2, systemd) · 6e8284e3
    Akihiro Suda authored
    Now rootless mode can be used with cgroup v2 resource limitations.
    A pod is executed in a cgroup like "/user.slice/user-1001.slice/user@1001.service/k3s-rootless.service/kubepods/podd0eb6921-c81a-4214-b36c-d3b9bb212fac/63b5a253a1fd4627da16bfce9bec58d72144cf30fe833e0ca9a6d60ebf837475".
    
    This is accomplished by running `kubelet` in a cgroup namespace, and enabling `cgroupfs` driver for the cgroup hierarchy delegated by systemd.
    
    To enable cgroup v2 resource limitation, `k3s server --rootless` needs to be launched as `systemctl --user` service.
    Please see the comment lines in `k3s-rootless.service` for the usage.
    
    Running `k3s server --rootless` via a terminal is not supported.
    When it really needs to be launched via a terminal, `systemd-run --user -p Delegate --tty` needs to be prepended to create a systemd scope.
    Signed-off-by: 's avatarAkihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
    6e8284e3
Name
Last commit
Last update
.github Loading commit data...
cmd Loading commit data...
contrib Loading commit data...
e2e Loading commit data...
manifests Loading commit data...
package Loading commit data...
pkg Loading commit data...
scripts Loading commit data...
tests/perf Loading commit data...
vendor Loading commit data...
.dockerignore Loading commit data...
.drone.yml Loading commit data...
.gitignore Loading commit data...
.golangci.json Loading commit data...
BUILDING.md Loading commit data...
CODEOWNERS Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
CONTRIBUTING.md Loading commit data...
DCO Loading commit data...
Dockerfile.dapper Loading commit data...
Dockerfile.manifest Loading commit data...
Dockerfile.test.dapper Loading commit data...
LICENSE Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
ROADMAP.md Loading commit data...
Vagrantfile Loading commit data...
channel.yaml Loading commit data...
docker-compose.yml Loading commit data...
go.mod Loading commit data...
go.sum Loading commit data...
install.sh Loading commit data...
k3s-rootless.service Loading commit data...
k3s.service Loading commit data...
main.go Loading commit data...
vendor.go Loading commit data...