☸ What is Kubernetes? Let's explain! 🚢☸

(Thread) 🧵👇

#100DaysOfCode
#CodeNewbie
#DEVCommunity
🔌 As always, if you're looking for a more accessible and convenient version of this thread, you can find it at the Let's Explain website: 👇👇

🌐 https://letsexplain.netlify.app/kubernetes 

☕ (Consider supporting: https://www.buymeacoffee.com/SavvasStephnds )
In a previous thread, we talked about Docker and how you can load all your libraries and tools into little boxes called containers. See that thread before proceeding https://twitter.com/SavvasStephnds/status/1316746971001098240
So to continue our story, let’s say your friend suggests you post your to-do app online. As a normal website.
You think this is a great idea. So you go ahead and by the end of the day your app is available for the whole world
Since your app is already in containers, you can simply move that container online, on a server
Upon further reading however, you discover that it’s common practice to have lots of small containers instead of one large one, to make it easier to maintain:

- One container for your database

- One container for your backend

- One container for your front end
So you go ahead and split your app into smaller Docker containers, one for MySQL, one for the Python backend, and one for your React front end. Finally your to-do app is online. Now anyone can log in and organise their day! Brilliant!
After a couple of days, you notice that quite a few people use your app. In fact, over a thousand accounts have been created. That's crazy! But it's fine right? What could go wrong?
One week later, you get a late night call from your friend.

Breathing deeply he's shouting "YOUR WEBSITE ISN'T WORKING! WHAT IS GOING ON?". You do a quick check and realise that the Python backend went down! So your front end has no way to communicate with the database!
You nervously log in to your server, type in a few commands, and after a few minutes, your app is up and running again. No harm caused... except for 407 angry emails from customers and at least 300 of them have cancelled their account because your app is unreliable.
This is quite common for web apps that are widely available online. If many people use your website, it will go down because the traffic is too much.
What if there was something that could continuously watch if anything goes wrong and fix it for you, so you don't have to jump from your seat every time something goes wrong and start rushingly typing commands to get it back up again?
Enter Kubernetes!
Kubernetes is a cool tool that works alongside Docker to make sure your containers behave.
It sort of acts like an instructor to make sure everything works correctly, like an orchestra. Which is why you'll often hear it being called an "orchestration framework".
It is designed to give you peace of mind when putting Docker containers online. You can rest assured that your app works as it should, always.
Kubernetes keeps an eye on your containers, and whenever something goes wrong, for example a container goes switches off, it will create a new one and toss the older one.
You can follow @SavvasStephnds.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: