1.3.1 Ensure that the --terminated-pod-gc-threshold argument is set as appropriate

Information

Activate garbage collector on pod termination, as appropriate.

Rationale:

Garbage collection is important to ensure sufficient resource availability and avoiding degraded performance and availability. In the worst case, the system might crash or just be unusable for a long period of time. The current setting for garbage collection is 12,500 terminated pods which might be too high for your system to sustain. Based on your system resources and tests, choose an appropriate threshold value to activate garbage collection.

Solution

Edit the `/etc/kubernetes/controller-manager` file on the master node and set the `KUBE_CONTROLLER_MANAGER_ARGS` parameter to `'--terminated-pod-gc-threshold='`: `KUBE_CONTROLLER_MANAGER_ARGS='--terminated-pod-gc-threshold=10'`

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

Impact:

None

See Also

https://workbench.cisecurity.org/files/1738

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6b., CSCv6|14

Plugin: Unix

Control ID: 5f9015b67805f6ea1e74cd24e5a9652aa6305ffbf8490f85f1e6fa1e08bcd055