InformationDo not generally permit containers to be run with the hostIPC flag set to true.
A container running in the host's IPC namespace can use IPC to interact with processes outside the container.
There should be at least one Security Context Constraint (SCC) defined which does not permit containers to share the host IPC namespace.
If you have a requirement to containers which require hostIPC, this should be defined in a separate SCC and you should carefully check RBAC controls to ensure that only limited service accounts and users are given permission to access that SCC.
Pods defined with Allow Host IPC: true will not be permitted unless they are run under a specific SCC.
SolutionCreate a SCC as described in the OpenShift documentation, ensuring that the Allow Host IPC field is set to false.
By default, OpenShift 4 clusters include the following SCCs:
anyuid Allow Host IPC: false
hostaccess Allow Host IPC: true
Hostmount-anyuid Allow Host IPC: false
hostnetwork Allow Host IPC: false
node-exporter Allow Host IPC: false
non-root Allow Host IPC: false
privileged Allow Host IPC: false
restricted Allow Host IPC: false