No space left on device: How to clean docker cache


#1

Hi,

is there any way to clean all cached docker images etc from a kubernetes setup that could free up space on the master nodes?
I try to install a deployment but the kubernetes prompts “no space left on device” while image pulling.

Successfully pulled image "tensorflow/serving:1.11.1"
  Warning  Failed            4m30s                  kubelet, 192.168.10.37  Failed to pull image "gcr.io/kubeflow-images-public/tf-model-server-http-proxy:v20180606-9dfda4f2": rpc error: code = Unknown desc = failed to register layer: Error processing tar file(exit status 1): write /usr/lib/python3.5/idlelib/__pycache__/CodeContext.cpython-35.pyc: no space left on device
  Warning  Failed            4m27s (x3 over 4m29s)  kubelet, 192.168.10.37  Error: ImagePullBackOff

I am kind of surprised that a 80GB disk is not enough for one simple deployment because the cluster is now completely emptied.

Does anyone has an idea on how to wipe all unused docker image etc out? :slight_smile:

Thanks a lot!


#2

docker image prune -a

or install a tool that will do it for you: