How to speed up pulling image speed for k8s cluster

5/20/2019

I have one application will start one pod in any node of cluster, but if that node doesn't have this image, it will downloading it the first time and it takes a lot of time (it is around 1gb, and takes more than 3 minutes to download the image), what is the best practice to solve this kind of issue ? Pre pull image or share docker image via nfs ?

-- zjffdu
docker
kubernetes

4 Answers

5/21/2019

You can give a try to pod disruption budget. With it you can achieve high availability in your app and the download time shouldn't be a problem.

Regards

-- mdaguete
Source: StackOverflow

5/21/2019

Continuation to @anskurtis-streutker answer, this page explains in detail how to create smaller images.

Build smaller images - Kubernetes best practises

-- Malathi
Source: StackOverflow

5/20/2019

Try to reduce the size of the image.
This can be done a few ways depending on your project. For example, if you are using Node you could use FROM node:11-alpine instead of FROM node:11 for a significantly smaller image. Also, make sure you are not putting build files inside the image. Languages like C# and Java have separate build and runtime images. For example, use java-8-jdk to build your project but use java-8-jre your final image as you only need the runtime.

Good luck!

-- Kurtis Streutker
Source: StackOverflow

5/20/2019

Deploy a personal docker repository.

https://docs.docker.com/registry/deploying/

-- Eric Yu
Source: StackOverflow