What Are All These Boxes Doing Here?

What Are All These Boxes Doing Here?

Explaining Docker & Kubernetes for confused people.

Hi lovely readers,

Some days ago I saw a tweet by Daniel Cranney, who confessed that he didn’t understand what Docker and Kubernetes does. Tweet by Daniel Cranney saying 'Confession: I have no idea what Kubernetes and Docker actually do.'

I saw a lot of replies that were very technical, using words like ‘VM’, ‘horizontal scaling’, and ‘C-groups’. So I replied with a more non-technical approach.

Tweet by Lou Creemers saying 'Docker is like a box where you put everything in to make a project run. After you have everything, you can give a copy of the box to anybody. Kubernetes helps with altering multiple boxes automatically. It can make the boxes bigger or smaller, and automates updates.'

I definitely didn’t expect so many likes on my reply, and replies under my explanation about how lovely my explanation is (thank you!). Because this seems to be so understandable, I want to explain it a bit broader than I could with 255 symbols.

Read along and let me give you a non-technical explanation on what Docker and Kubernetes does. I also added some pictures to visualize it more for you. Let’s go!

Disclaimer: This is not the most technical correct explanation for Docker or Kubernetes, but more like how I was able to grasp the idea of it when I started using it 1 year ago. If you’re looking for technical correct or in-depth explanations, look up the documentation. There’s a lot of it out there.

Docker

Docker is a software product you can use to run your projects in. With Docker you can create a box. In this box you can put whatever you need to make your project run. This can be packages, languages, operating systems, project files etc.

A box with Files, NodeJS, JavaScript, and React above it with arrows pointing towards the box

If you were running your project locally on your computer before, and you know you need some extra commands, settings, or ports to be able to run your project, you can add that in the box as well.

A box with Files, NodeJS, JavaScript, React, settings, ports, and commands above it with arrows pointing towards the box

After your application runs like you would normally run it locally, you can just use your box whenever you need it. You can now give a copy of your box to anyone that wants to use it, no matter what kind of computer they have, and they can use your box instantly without having to add anything.

Multiple closed boxes

Technical addition

This box is in technical terms called a container. That’s why you’ve maybe heard of ‘Containerization’ or ‘containerizing’ before.

You can create a container by writing a script in a Dockerfile. Do you want to know how to create a script and how to run it? I recommend the ‘Dockerfile Basic commands’ video by Automation Step by Step.

Kubernetes

Many of us have multiple projects. And once you know how easy making a box for your project is, you probably want to do that for all your projects. So you get more and more boxes. Some might be multiple copies of the same project, or all completely different projects.

Different boxes, with different colors and sizes

Sometimes when you run a website, there’s too much traffic or resources for a box to work smoothly. Kubernetes can help you with that by making your box bigger or smaller, when needed.

A smaller box with an arrow pointing to a bigger box

Another big thing Kubernetes does is monitoring of all the boxes. It looks into the network parts of all the boxes, and let you know when there’s a risk of a box going offline. This way you can sleep peacefully at night, and enjoy your weekends.

A box pointing towards a monitoring screen with an red explanation mark next to it

That’s it!

Hopefully you got a small idea of what Docker and Kubernetes do now, and you have an idea of what the difference is between the two products.

Thank you for reading. I hope this can help you in your development adventures. If you have any suggestions or tips, feel free to leave a comment or contact me on Twitter at @lovelacecoding. See you later!