|
This is unreleased documentation for SUSE® Rancher Manager v2.16 (Unreleased). |
About rancher-selinux
To allow Rancher to work with SELinux, some functionality has to be manually enabled for the SELinux nodes. To help with that, Rancher provides an SELinux RPM.
|
Why SELinux?
By assigning a dedicated SELinux type to each container, we ensure that containers are limited to their minimal needs and cannot pivot to other resources if compromised. |
The rancher-selinux RPM contains a set of SELinux policies designed to grant the necessary privileges to various Rancher components running on Linux systems with SELinux enabled.
Source code, policy definitions, and development guides are available in the rancher-selinux GitHub repository.
Supported Operating Systems
| Operating System | Version | Repo path |
|---|---|---|
openSUSE Leap / SLE / SLE Micro |
16 / 6 |
|
openSUSE MicroOS / Tumbleweed |
Rolling |
|
RHEL / CentOS / Rocky Linux |
9 |
|
RHEL / CentOS / Rocky Linux |
10 |
|
All policies are covered by end-to-end tests. For the most up-to-date compatibility details, see the rancher-selinux support matrix.
Installing the rancher-selinux RPM
Install rancher-selinux on all SELinux-enabled nodes in the cluster. Replace <repo-path> with the corresponding path value from Supported operating systems and repository paths.
openSUSE Leap, SLE, SLE Micro, and MicroOS
cat << EOF > /etc/zypp/repos.d/rancher.repo
[rancher]
name=Rancher
baseurl=https://rpm.rancher.io/rancher/production/<repo-path>/noarch
enabled=1
gpgcheck=1
gpgkey=https://rpm.rancher.io/public.key
EOF
zypper --gpg-auto-import-keys refresh
zypper install -y rancher-selinux
On transactional systems such as SLE Micro and openSUSE MicroOS, replace zypper install with:
transactional-update pkg install rancher-selinux
reboot
Configuring Applications to Work with SELinux
Installing the rancher-selinux RPM on the host does not automatically confine applications. Applications must be explicitly configured to run in an allowed SELinux container domain provided by the RPM.
To configure supported Helm charts to be SELinux aware, set global.seLinux.enabled to true in the values.yaml file when installing or upgrading the chart.
| Chart | Container | SELinux type |
|---|---|---|
Rancher Monitoring |
node-exporter |
|
Rancher Monitoring |
pushprox |
|
Rancher Logging |
fluentbit |
|
Rancher AI |
rancher-ai-agent |
|
Rancher AI |
rancher-ai-mcp |
|
|
Only the components listed in Dedicated SELinux types by chart receive a dedicated SELinux type. Other Rancher components and general workloads use the default |