Kubernetes for dummies…..Part 1!


Now, since you are interested in learning everything about the exciting field of “DevOps”, you’ve probably heard a lot about Kubernetes. And some of it could be probably categorized as “bad”, in the sense of that its too complicated, bloated, has a lot of bugs, you never have to use it etc…..

In some situations that can even be true, but ask yourself? Why does every DevOps job requirement consider it a necessity? Is it because it became fashionable, kind of a cool term to get people to apply to a job add?

Actually, no…..

There was a war not long ago (circa 2016/17) nicknamed the “Container Orchestration War”. Kubernetes at that time wasn’t the only (and still isn’t) software for managing containers, but it did won and became Number 1!

All hail the King, aka Kubernetes!

Just to mention briefly, one of the reasons why it’s awesome (and became the winner) is that it’s open source, and probably one of the most successful (if not the most successful) open source projects ever.

It you go on its github page you’ll see that it has around 97k stars, and around 3400 contributors worldwide. It’s not going away any time soon!

Its backed by EVERY mayor cloud provider like aws, google cloud, azure (it’s creator now works there), digital ocean etc. It’s also backed by RedHat and the CNCF foundation.

kube logo
kube logo

Now, the whole premise of kubernetes is that you’re sold on the idea of using docker images/containers. Considering that some people don’t know what that docker images mean, let me just say that images are used to package software in a convenient way that gives you two great advantages:

1.) It bundles every dependency for your project in a single bundle, that includes your programming language, libraries, EVERYTHING. And the best part is you don’t have to have all those things installed on your local computer (other then docker of course).

Now you might think that doesn’t sound like that big of a deal, but my friend it is. Getting something to work on a dev’s computer is no small feat, and getting to work on everyone else’s is even harder. Installing python, ruby, postgres, IDE’s, rabbitmq, kafka, redis, vpn’s other libraries, the right kind of dependencies……sometimes I wanna cry at times that something wouldn’t work just because I had a wrong version of XY lib installed on my laptop………Many tech people lost a lot of time getting stuff to work on their local stations and troubleshooting why it doesn’t work the same on a colleague in the same team.

2.) It give you reproducibility, no matter your running environment. Now by that I mean it doesn’t matter if you run in locally on linux, mac, windows it will run just the same (there are differences, but let’s keep that for a different article). Also if you run a image (a running image is called a “container”) in separate envs like dev, stage, uat or prod it wouldn’t make any difference. It will always run the same. But you could control it’s behaviour with different configurations for different environments.

And Docker delivered on those two promises, and everything was right and beautiful in the universe.

But it wasn’t enough……….because docker images are really not the whole picture of running something reliably online. Yeah I know, it never ends…..

After the introduction (or may I say revolution) of docker images, there still was the need of their “orchestration”. What I mean by it is the following:

  • application configuration
  • service discovery
  • managing updates
  • deployment
  • monitoring

And docker alone can’t give you all those things, hence Kubernetes or it’s short name k8s. And not only does it give you those things, it also has some AWESOME features to sweeten the deal:

  • horizontal scaling
  • self healing
  • load balancing
  • secret and configuration management
  • BETTER SERVER UTILIZATION (think of it as paying less money)

I can almost hear some of you just shouting at me with things like:

  • why can’t I just use docker-compose in production?
  • all that writing about k8s made me really sleepy, wat happened with good old vm’s and all that?

Well, docker-compose is just a simple tool and can’t do all the things that I just mentioned. And if you feel that you don’t need all the benefits and complexity of kubernetes then by all means use it.

For the second question, bro have you been sleeping under a rock for the past 8 years! Go back to the benefits of docker that I just mentioned earlier, and please drink some coffee or yerba mate to clear your head 🙂

From experience, I can tell you that doing stuff manually like we used to do it before kubernetes, was really a drag (you could have used automation, but never on this scale) and in general it was a big waste of your time, not to mention that things like self healing were just a pipe dream.

But not anymore, hence kubernetes!

Hope you enjoyed the first part of our kubernetes series, an

Leave a Reply

Your email address will not be published. Required fields are marked *