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.
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.
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 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.
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.
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.
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.
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.
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.
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.
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!