Skip to content

Latest commit

 

History

History
64 lines (46 loc) · 2.9 KB

k8s-best-practices-cnf-security.adoc

File metadata and controls

64 lines (46 loc) · 2.9 KB

Workload security

In OCP, it is possible to run privileged containers that have all of the root capabilities on a host machine, allowing the ability to access resources which are not accessible in ordinary containers. This, however, increases the security risk to the whole cluster. Containers should only request those privileges they need to run their legitimate functions. No containers will be allowed to run with full privileges without an exception.

The general guidelines are:

  1. Only ask for the necessary privileges and access control settings for your application.

  2. If the function required by your workload can be fulfilled by OCP components, your application should not be requesting escalated privilege to perform this function.

  3. Avoid using any host system resource if possible.

  4. Leveraging read only root filesystem when possible.

Important
Workload requirement

Only ask for the necessary privileges and access control settings for your application

Important
Workload requirement

If the function required by your workload can be fulfilled by OCP components, your application should not be requesting escalated privilege to perform this function.

Important
Workload requirement

Avoid using any host system resource.

Important
Workload requirement

Do not mount host directories for device access.

Important
Workload requirement

Do not use host network namespace.

See test case access-control-namespace

Important
Workload requirement

Workloads may not modify the platform in any way.