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.5.3.3. 设置 SELinux 布尔值
OpenShift Container Platform 允许您在 Red Hat Enterprise Linux CoreOS (RHCOS) 节点上启用和禁用 SELinux 布尔值。以下流程解释了如何使用 Machine Config Operator (MCO) 修改节点上的 SELinux 布尔值。此流程使用 container_manage_cgroup
作为示例布尔值。您可以将这个值修改为您需要的任何布尔值。
先决条件
- 已安装 OpenShift CLI(oc)。
流程
使用
MachineConfig
对象创建新 YAML 文件,如下例所示:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 运行以下命令来创建新的
MachineConfig
对象:oc create -f 99-worker-setsebool.yaml
$ oc create -f 99-worker-setsebool.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
注意
对 MachineConfig
对象应用任何更改将导致所有受影响的节点在应用更改后安全重启。