Skip to content

Commit 55d29ed

Browse files
committed
Warn against using a custom --data-dir for K3s with SELinux
1 parent dc1a925 commit 55d29ed

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/k3s/latest/en/advanced/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ To force the install script to log a warning rather than fail, you can set the f
316316

317317
The way that SELinux enforcement is enabled or disabled depends on the K3s version. Prior to v1.19.x, SELinux enablement for the builtin containerd was automatic but could be disabled by passing `--disable-selinux`. With v1.19.x and beyond, enabling SELinux must be affirmatively configured via the `--selinux` flag or config file entry. Servers and agents that specify both the `--selinux` and (deprecated) `--disable-selinux` flags will fail to start.
318318

319+
Using a custom `--data-dir` under SELinux is not supported. To customize it, you would most likely need to write your own custom policy. For guidance, you could refer to the [containers/container-selinux](https://github.com/containers/container-selinux) repository, which contains the SELinux policy files for Container Runtimes, and the [rancher/k3s-selinux](https://github.com/rancher/k3s-selinux) repository, which contains the SELinux policy for K3s .
320+
319321
{{% tabs %}}
320322
{{% tab "K3s v1.19.1+k3s1" %}}
321323

0 commit comments

Comments
 (0)