-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Look into improving minikube start
time with containerd by 10%
#10438
Comments
My main idea around improving start time is to start including preloaded tarballs in the kic base image. Instead of downloading preload images as a separate tarball, we could include the tarball as the final layer in the kic image. Pros:
Cons:
Ideally we could remove the preloaded tarball entirely, and just find a way to inject the images into the base image so that they're available as soon as the container spins up. |
As you probably know, this is what kind is doing (with the "node" image, that is layered on top of the "base" image) https://github.com/kubernetes-sigs/kind/tree/master/images/node Main difference being that they build their kubernetes, instead of just installing it from ready-made binaries.
|
In order to do this, one would probably first want to do different installation for different runtimes: #9989 Otherwise the kicnode image would be enormous, if it included both the packages and the images:
So in the "worst" case, you could end up with four different layers of images (some of them squashed?).
But the final step should not be more complicated than trying to recreate what the code is currently doing. FROM gcr.io/k8s-minikube/kicbase:v0.0.20
ADD preloaded-images-k8s-v10-v1.20.2-docker-overlay2-amd64.tar.lz4 /var |
Turns out that docker doesn't support lz4 compression for ADD, only gz and xz. ADD preloaded-images-k8s-v10-v1.20.2-docker-overlay2-amd64.tar.gz /var
And that there are some weird files (like /dev/console) in the current tarball.
COPY preloaded-images-k8s-v10-v1.20.2-docker-overlay2-amd64.tar.lz4 /tmp
RUN tar -I lz4 -C /var -xf /tmp/preloaded-images-k8s-v10-v1.20.2-docker-overlay2-amd64.tar.lz4 || true
RUN rm /tmp/preloaded-images-k8s-v10-v1.20.2-docker-overlay2-amd64.tar.lz4 This workaround creates a huge image (2.3G), but it does start up a little quicker. |
This would be about a 4 second improvement.
The text was updated successfully, but these errors were encountered: