Is there a way to view the Kubernetes image download progress during pod initialization?

2/5/2015

Is there a way to obtain log information about what is happening with Kubernetes after creating a pod. The kubectl get pods only provides a basic status message. In the case of downloading a large image this can take time and the kubectl log command does not provide any real information at this point. This command seems to only provide information when the container is running.

Is there a way to obtain more log information about the current state of a Kubernetes pod. Calling docker pull directly provides download status information, but that isn't obvious in Kubernetes.

-- Alex Beggs
kubernetes

2 Answers

2/5/2015

Unfortunately, Kubernetes doesn't currently expose the progress of docker pull. I think your best bet is to look at /var/log/docker.log on the machine that the pod got scheduled onto.

-- CJ Cullen
Source: StackOverflow

1/6/2018

To add to previous answer, if your using a modern worker with systemd you will probably not have a /var/log/docker.log file at all.

You can see if downloads are active (on ubuntu/conjure-up) by:

  • running bandwidth monitoring tools like bmon on the worker (or its hypervisor)
  • check download file progress on the worker: du -s /var/lib/docker/tmp
  • check systemd logs: journalctl --unit docker
  • Once download is complete, files will be removed from tmp dir

If you see messages like: Handler for GET /v1.26/images/docker.io/XXX/XXX:latest/json returned error: No such image: docker.io/XXX/XXX:latest - then I think this means that the image isn't available and will be downloaded, not that it doesn't exist remotely ;-)

-- Geoff Williams
Source: StackOverflow