Removing unused images from nodes using the image pruner in OpenShift 4
Environment
- Red Hat OpenShift Containter Platform (RHOCP)
- 4
- Red Hat OpenShift Service on AWS (ROSA)
- 4
- Red Hat OpenShift Dedicated (OSD)
- 4
Issue
- How to configure the image pruner to prune images from nodes in OCP 4?
- After configuring the image pruner as per the documentation, unused images are not removed from nodes in OCP 4.
Resolution
The image pruning described in Automatically pruning images and Manually pruning images is for removing unused images from the OpenShift internal registry.
For removing unused images from nodes, the Garbage Collector is used instead. Refer to the documentation about freeing node resources using garbage collection for additional information.
Note: Configuring the Garbage Collector is not allowed in OSD/ROSA clusters. There was an internal RFE to allow it, and was rejected.
Root Cause
The image pruning described in the documentation is for removing unused images from the OpenShift internal registry. For removing unused images from nodes, the Garbage Collector is used instead.
Diagnostic Steps
Refer to Default values for the garbage collection related parameters on OCP4 for checking the Garbage Collector configuration in the cluster.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments