You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/advanced.md
+18-3Lines changed: 18 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -297,12 +297,27 @@ See https://rootlesscontaine.rs/ to learn more about Rootless Kubernetes.
297
297
* Enable cgroup v2 delegation, see https://rootlesscontaine.rs/getting-started/common/cgroup2/ .
298
298
This step is required; the rootless kubelet will fail to start without the proper cgroups delegated.
299
299
300
-
* Download `k3s-rootless.service` from [`https://github.com/k3s-io/k3s/blob/<VERSION>/k3s-rootless.service`](https://github.com/k3s-io/k3s/blob/main/k3s-rootless.service).
301
-
Make sure to use the same version of `k3s-rootless.service` and `k3s`.
300
+
* On Ubuntu or other distributions with AppArmor support, you must allow the K3s binary to run unconfined:
301
+
```bash
302
+
cat <<EOF | sudo tee "/etc/apparmor.d/usr.local.bin.k3s"
303
+
abi <abi/4.0>,
304
+
include <tunables/global>
305
+
306
+
/usr/local/bin/k3s flags=(unconfined) {
307
+
userns,
308
+
309
+
include if exists <local/usr.local.bin.k3s>
310
+
}
311
+
EOF
312
+
313
+
sudo systemctl restart apparmor.service
314
+
```
315
+
316
+
* Download `k3s-rootless.service` from [`https://github.com/k3s-io/k3s/blob/main/k3s-rootless.service`](https://github.com/k3s-io/k3s/blob/main/k3s-rootless.service).
302
317
303
318
* Install `k3s-rootless.service` to `~/.config/systemd/user/k3s-rootless.service`.
304
319
Installing this file as a system-wide service (`/etc/systemd/...`) is not supported.
305
-
Depending on the path of `k3s` binary, you might need to modify the `ExecStart=/usr/local/bin/k3s ...` line of the file.
320
+
Depending on the path to the `k3s` binary, you might need to modify the `ExecStart=/usr/local/bin/k3s ...` line of the file.
0 commit comments