Ivan on Containers, Kubernetes, and Backend Development


Hello friends!

Ivan's here with a monthly roundup from iximiuz.com.

May was nuts! The new job and the first time ever KubeCon trip made it quite overwhelming for me. But it was definitely great!


SPONSORED (but highly relevant) Access Multiple Kubernetes Clusters - the right way. Yet another good read by Teleport with some practical advice sprinkled with a bit of Kubernetes API theory. Go check it out!


What I Was Working On

I started the month from digging into the DockerSlim codebase (Yay, I do open source for a living now!) The top-level idea of the DockerSlim project is simple - take a (potentially huge) container image, run it, collect the usage stats, and then build a new (hopefully slim) image putting into it only the tracked files. However, as always, the devil is in the details. So, I spent like a week learning the ins and outs. As usual, it ended up with a diagram:

How DockerSlim makes images, well, slim!

The DockerSlim project started more than 7 years ago, when Docker was (kinda sorta) the only option to run containers (hence, the project name), and most of the use cases were as simple as a single `docker run <image>`. Nowadays, though, you'll rarely find a production image that can run in isolation - all sorts of sidecars and external dependencies are expected. So, my first (non-trivial) DockerSlim contribution was adding the initial Kubernetes support. Instead of running a single container image locally, I'm teaching DockerSlim how to trace and minimize workloads running in a Kubernetes cluster!

The Kubernetes runtime support for DockerSlim is still WiP, but I managed to get the PoC done during the second week of May, so there was a good reason for us to go to KubeCon and get the initial feedback. KubeCon was awesome! I met the Slim.AI team, I met a number of great folks whom I knew from Twitter and other online communities, and I got tons of ideas and inspiration from hordes of like-minded people hanging around!

twitter profile avatar
Ivan Velichko
Twitter Logo
@iximiuz
May 18th 2022
7
Retweets
89
Likes

One of these ideas was actually an enhancement for DockerSlim! Keeping images slim is generally preferred, but there are downsides too. For instance, slim images typically lack debugging tools. So, inspired by the Kubernetes Ephemeral Containers talk, we decided to conduct a mini-hackathon right during KubeCon and implement the new `docker-slim debug` command. Surprisingly (never thought a conference might be the right place for coding), it went really well, and despite the maximum possible level of distraction, Dan Čermák made this new command happen, almost in no time. Kudos to Dan!


What I Was Writing

I'll be honest, it was quite challenging to find time for writing this month. But I managed to extend the Kubernetes API series a bit - the new article How To Develop Kubernetes CLIs Like a Pro shows how to use the `k8s.io/cli-runtime` library to build CLI tools that behave like and are as potent as the mighty `kubectl`. I also summarized my first impression from Kubernetes Ephemeral Containers and `kubectl debug` Command - check out this illustrated post where I explain the internal kitchen of ephemeral containers revealing a bunch of potential pitfalls.


What I Was Reading

Much like with writing, there was very little time for reading:


Stay Tuned

Well, this is it for the May roundup. See you in June! And until then, stay safe and healthy!

Cheers,

Ivan Velichko

Ivan Velichko

Building labs.iximiuz.com - a place to help you learn Containers and Kubernetes the fun way 🚀

Read more from Ivan Velichko

Hello 👋 It's this time of the month again! My traditional roundup of all things Linux, Containers, Kubernetes, and Server Side, delivered straight into your inbox 📬 What I was working on October was very productive for me - I shipped no major iximiuz Labs features (it's always hard to resist the temptation!) and instead dedicated all my available time to content work. The main focus was on Container Images. It's the subject of the first module of my "panoramic" Docker course, and it is almost...

Hey there, I’ve just finished putting together everything I know about Node.js container images and figured you might find the write-up useful. If you’re working with Node.js in Docker, chances are you’ve been hit by the dilemma of which base image to use. Do you go for the default node:latest, the slimmer node:22-slim, or something super minimal like a distroless image? What about Bitnami’s alternative — how does it stack up? Before you jump headfirst into your next build, you might want to...

Hello 👋 Ivan's here with a slightly delayed September roundup of all things Linux, Containers, Kubernetes, and Server Side 🧙 What I was working on This month, I worked on an assorted set of topics. Skill Paths First off, the skill paths! I finally finished the underlying machinery, and now iximiuz Labs supports a new type of content - short roadmaps that you can use to develop or improve a specific skill: how to debug distroless containers, how to copy images from one repository to another,...