Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Pull Kubernetes control plane images during kube image build #15

Closed
benkulbertis opened this issue Feb 11, 2019 · 4 comments
Closed

Pull Kubernetes control plane images during kube image build #15

benkulbertis opened this issue Feb 11, 2019 · 4 comments
Assignees

Comments

@benkulbertis
Copy link
Collaborator

Doing this instead of pulling it on every ./minislate init will save users time and bandwidth.

@benkulbertis benkulbertis self-assigned this Feb 11, 2019
@benkulbertis
Copy link
Collaborator Author

This can't simply be done with kubeadm config images pull because the docker daemon needs to be running and it is not during the build process. The current hack to make this work would likely be to cache the images with docker save after they are pulled on the first init to a volume. All inits would check if the directory that is volumed contains the image tar files and if so would load them in prior to kubeadm init so they would be utilized.

@benkulbertis
Copy link
Collaborator Author

benkulbertis commented Feb 18, 2019

An alternative to help speed up the time it takes to pull the control plane images may be to use the hyperkube image option for kubeadm. I believe this will reduce the number of images downloaded.

https://github.com/kubernetes-sigs/kubeadm-dind-cluster/blob/3fc17d5c4702b9dccf791837a220d8606659ffde/image/kubeadm.conf.1.13.tmpl#L60

kubernetes/kubernetes#70793

@benkulbertis
Copy link
Collaborator Author

The hyperkube option actually pulls about 70MB more of data even though less images are pulled. So this is not a viable solution.

@benkulbertis
Copy link
Collaborator Author

Settled on a combination of the two, using the Hyperkube image it is cached as a tar file on build, then on init that tar file is loaded into Docker. This saves a reasonable amount of bandwidth and uses a little less time to initialize.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant