This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.4.11.3.3. SELinux
Red Hat Enterprise Linux(RHEL)和 Red Hat Enterprise Linux CoreOS(RHCOS)系统被配置为默认在远程 NFS 服务器中使用 SELinux。
对于非 RHEL 和非 RHCOS 系统,SELinux 不允许从 pod 写入远程 NFS 服务器。NFS 卷正确挂载,但只读。您将需要按照以下步骤启用正确的 SELinux 权限。
先决条件
-
必须安装
container-selinux
软件包。这个软件包提供virt_use_nfs
SELinux 布尔值。
流程
使用以下命令启用
virt_use_nfs
布尔值。使用-P
选项可以使这个布尔值在系统重启后仍然有效。setsebool -P virt_use_nfs 1
# setsebool -P virt_use_nfs 1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow