Delete old docker images from all kubernetes Node Delete old docker images from all kubernetes Node kubernetes kubernetes

Delete old docker images from all kubernetes Node


You could also simply connect to the node in question and run docker system prune -f there directly.


Follow the below steps

  1. Create a shell script to run docker system prune -f.
  2. Build a docker image using the shell script from above
  3. Deploy a cronjob to clean up daily or twice in a day