<p>I need to understand how we can delete a docker image using Kubernetes. I'm using Jenkins for pipeline automation and Jenkins only has access to the master node, not the slaves. So when I generate the deploy everything works fine, the deploy makes the slaves pull from the repository and I get everything going.</p>

<p>But if Jenkins kills the deploy and tries to remove the image, it only deletes the image on the master node and not on other slaves. So I don't want to manually delete the image.</p>

<p>Is there a way to delete images on slave nodes from the master node?</p>

Bedjase
<p>Kubernetes is responsible for deleting images, It is kubelet that makes garbage collection on nodes, including image deletion, it is customizable.
Deleting images by external methods is not recommended as these tools can potentially break the behavior of kubelet by removing containers expected to exist.</p>
<p>Kubelet verifies if the storage available for the images is more than 85% full, in that case it deletes some images to make room. Min and Max threshold can be customized in the file
/var/lib/kubelet/config.yaml</p>
<p>imageGCHighThresholdPercent is the percent of disk usage after which image garbage collection is always run.</p>
<p>ImageGCLowThresholdPercent is the percent of disk usage before which image garbage collection is never run. Lowest disk usage to garbage collect to.</p>
<p>Default values are :</p>
<p>ImageGCHighThresholdPercent 85</p>
<p>ImageGCLowThresholdPercent  80</p>
