← Journal · · Deep dive
Lazy loading images with Stargz Snapshotter

So I started digging deeper. Found an interesting article that explains how image pulling and extraction actually work, and how you can do lazy loading of layers. For example, you can use snapshotters! One of these is Stargz Snapshotter, with out-of-the-box support in containerd. And here you can read more about how to use it. Here's the gist 1. Install the snapshotter on the node 2. Build the image with buildx/kaniko, specifying compression=estargz in the options 3. Deploy the pod to Kubernetes, and voila (in my case the image pulled in 8.6 seconds, and the service itself came up in 1.5 minutes, compared to 6 minutes with the standard approach) I'm also attaching benchmarks against the baseline pulling approach. Pulling time drops several times over! Great for working with big images, but there's more to explore here)