Understanding Kubernetes can be difficult or time-consuming. In order to spread knowledges about Cloud technologies I started to create sketchnotes about Kubernetes. I think it could be a good way, more visual, to explain Kubernetes (and others technologies).
We continue the serie of Sketchnotes about Kubernetes, with a focus on native sidecar containers.
If you are interested, I published an entire illustrated book about Kubernetes, available in paperback on Amazon and in digital version on GumRoad: "Understanding Kubernetes in a visual way".
As usual, if you like theses sketchnotes, you can follow me, and tell me what do you think. I will publish others sketchs shortly :-).
Top comments (11)
Literally googled this today and got very confused!
Great post, I'll check out your book!
thanks :)
Nice article
Had been wondering how to find the sketchbook for a looong time ! Happy to see this series & learn new things.
Nice sketches :) there's something I don't understand about sidecar containers: they have to be init containers or they could just be additional containers listed with the main container in the "containers" section of the yaml?
@iosonobenny Does not need to be init containers , it can be spec.containers as well instead of init containers.
Sidecar containers - Start with main containers, run concurrently
init containers - Run before main containers
side car containers are init containers with restartPolicy: Always.
Note the restartPolicy must be Always as this is what makes it a sidecar container
Yes, in order to define a sidecar, it has to be an init container with restartPolicy equals to Always :).
I know it can be confusing, having a sidecarContainers could be easier to understand but now it is stable so i don't think it will change in the future.
Technically speaking it's 100% clear. I don't understand why a "simple" container (not an init one) providing additional functions to the "main" container in the same pod, couldn't be considered a sidecar. Just a personal overthinking :)
Thanks for sharing this sketchnote! It's a great series for visualizing Kubernetes concepts.
I am kind of confused here. Usually I use sidecars as proxies, monitoring etc running along with the main containers. Eg linkerd has a sidecar injector which adds an init container and a proxy container(non-init container)
My understanding
Init Containers run to completion before the main application containers start. They are used for setup tasks.
Yes init containers are used, as their names suggests, in order to initialize things.
It's confusing to use the same name but for sidecar container.