1. Home
  2. Security Hardening
  3. CIS Kubernetes 1.7.0 Benchmark V1.1.0 L1
  4. Ensure that the –allow-privileged argument is set to false

Ensure that the –allow-privileged argument is set to false

Details

Do not allow privileged containers.

Rationale:

The privileged container has all the system capabilities, and it also lifts all the limitations enforced by the device cgroup controller. In other words, the container can then do almost everything that the host can do. This flag exists to allow special use-cases, like running Docker within Docker and hence should be avoided for production workloads.

Solution

Edit the `/etc/kubernetes/config` file on the master node and set the `KUBE_ALLOW_PRIV` parameter to `’–allow-privileged=false’`: `KUBE_ALLOW_PRIV=’–allow-privileged=false’`

Based on your system, restart the `kube-apiserver` service. For example: `systemctl restart kube-apiserver.service`

Impact:

You will not be able to run any privileged containers.

Note: A number of components used by Kubernetes clusters currently make use of privileged containers (e.g. Container Network Interface plugins). Care should be taken in ensuring that the use of such plugins is minimized and in particular any use of privileged containers outside of the kube-system namespace should be scrutinized. Where possible, review the rights required by such plugins to determine if a more fine grained permission set can be applied.

Supportive Information

The following resource is also helpful.

This security hardening control applies to the following category of controls within NIST 800-53: Access Control.This control applies to the following type of system Unix.

References

Source

Updated on July 16, 2022
Was this article helpful?

Related Articles