Kubernetes Bedtime Stories
Tags: beginners, programming, devops, productivity
Published: 2023-01-11 18:11:24

Once upon a time there was a web app name `App`. App loved kids and to serve stories and videos to them was App's calling.

Once a dev named Bart did some changes to code but for another dev Joe things broke due to the changes. When Bart was asked about the issue he said that the code works on his machine. Paul and Andrew started fighting over this issue and then App stepped in.

![But it works on my machine meme](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xsgxzb4zsybb8kax2zov.png)

`App:` I have to do something about this. What should I don't know whose fault is this but this trouble with people having different local environments is bringing flakiness.

App is very tensed and wants to relieve this burden of environment dependency from life. Who will help him.

Enter Docker.

`Docker:` Hey App I can help you. I know how it feels when stuff runs on one machine and does not work on another.

`App:` Thanks Docker now I feel good. I get updated quickly due to issues related to environment dependency have reduced. Even I have become easier to deploy. Come to my home I'll treat you with cookies. Bring linux and Go as well.

![Docker, Linux, Go, App partying](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o1czxmy5huslsuww4m2n.png)

Usually the traffic for App was 100,000 concurrent users but kids found about the coolness of App and concurrent users started growing to 1 million+. The codebase started to get real complex and the developers started to face difficulty working on features. 

One day a dev Paul was working on the `Authentication` system but Joe had made some changes in the `Accounts` system and the whole thing broke. Several such instances started taking place. Adding new feature was getting difficult without breaking things.

`App:` Hey Docker what should I do there are millions of kids sending me requests. We are not able to scale and our team is not able to co-ordinate well given the complexity of codebase. I feel bad if I will not be able to help them. How will they sleep at night without hearing lullabies and how will their moms' make them to eat without the videos.

Amidst this chaos a brilliant idea came to Docker's mind.


`Docker:` App don't worry let's contact Alice. She might be back from vacation in Hawaii.

With the suggestion of Docker, App contacted Alice who was the CTO of the company and mentioned the ongoing problems.

![App, Docker and Alice having a discussion](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0cjai3st98jsjm5ay61s.png)

`Alice (The CTO):` Ohh, this seems like a serious trouble. Hey, App why don't we try shifting to a micro-services (break down the code base to several different services). Let's say a different service for `Authentication`, one for `Accounts`, etc. This would help teams work independently without conflicts. Also we will be having a lot containers, so we need someone very skilled to manage all those.

`App:` Alice, do you know someone who can do the job of managing containers.

`Alice (The CTO):` Yes, I just happen to know the right guy.

`App:` Who

`Alice (The CTO):` Kubernetes 🤩.

Through Alice's referral App called Kubernetes for help.

![Kubernetes depicted as a real ship captain](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/41lnvnufepjp1615378a.png)


Enter Kubernetes.

`Kubernetes:` Hey folks I can help you out. I have some experience being a ship captain and I can sail the ships with containers (docker containers 😂). I can handle scaling of containers, logging, monitoring of containers, handle crashes and automatic failures.

App: How much does it cost the company.

Kubernetes: I believe in open source. My parents (Google) taught me the spirit of open source and the importance of open source community. I take inspiration from open source projects like linux and understand how crucial they are in the software world.

App: Ohh, thats gr8. Hey Kube guy I like you I have a cool nick name for you `k8s`.

Kubernetes: I love that name. I will gladly take it.

After a lot of effort and collaboration from the developers, Alice, Docker, k8s. App was again able to make the kids happy. Now Kids won't cry as they can watch their favourite videos on App.


![The end](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ev5cld8djjce9r9qd96r.png)