Let’s Speed up Kubernetes

Mutha Nagavamsi
2 min readAug 13, 2023

--

Kubernetes is fast, very fast ⚡

Now you can make it even faster. Find out how! Let’s go.

QUICK HELP: If you resonate with my work, please consider joining me on Youtube and Substack. I totally appreciate your support. Thank You.

In a large scale k8s cluster when you try to pull multiple images on a node, kubelet takes its sweet time to finish.

The problem: 🧐

- Kubelet will send only one image pull request at a time.
- Any additional image pull requests are queued until the ongoing one is completed.

In Kubernetes v1.27 release, you can have parallel image pulls.

Just set the serializeImagePulls field to false in the kubelet configuration and voila! You’re done.

Speedup kubernetes

Now, before you start 1000’s of parallel image pulls, let’s keep things stable, shall we?

Kubernetes has a clever trick for that — it sets a limit on the number of parallel image pulls.

Exceeding the limit will keep image pull requests on hold until the queue is little free.

To limit the concurrency part, you can configure “maxParallelImagePulls” field to a value “n” (a small number) of your choice.

That way, any additional image pulls beyond this limit will have to wait until one ongoing pull is complete.

With that done, Kubernetes is happy, kubelet is happy and everyone is happy. ☺️🎉

That’s it for today. Hope this is useful. A Reshare really helps ♻️

I’m Mutha Nagavamsi, follow me for simplified Kubernetes and Tech content.

PS: Read about this in Kubernetes official docs, check the link in comments.

--

--

Mutha Nagavamsi

I'm Building a 100K Community of Happy People. 61492 on all social. Follow me, I spread Kubernetes and Technology with JOY 😁 - https://bento.me/muthanagavamsi