Maksym Prokopov personal blog
Idea is a something worth sharing

Brief introduction to the Kubernetes.

26.05.2018

Kubernetes is a winner in docker cloud orchestration, so let’s get a brief introduction in what it is and what kind of problems it solves.

Kubernetes is a set of tools designed to solve a problem of deployment of your lovely tailor-made application to a cloud. It does not matter which cloud you choose, AWS, Azure or Google, or even IBM, because Kubernetes provides you with a set of tools which are platform independent.

For almost every application you need to talk to a database, to store some assets, to get requests and make responses to users with a useful content. So, basically you need to have a ‘storage’ for storing files, a ‘network’ to get requests and make responses to users and a ‘computing power with memory’ to run your application. All of this is quite simple if you run your application on a single computer (node), you have local storage on an HDD, i.e. a filesystem, you have a CPU and memory to run your application and a single network interface to talk to users and other services like external database or api. Suddenly you decide to deploy your application to some cloud provider and users start using your application on a huge scale and then you decide to scale your application across cloud nodes.

This is still not that moment when you need Kubernetes, because you can use cloud provided facilities like Amazon S3 for storage, Amazon RDS for automatically scaled databases and more Amazon EC2 instances to run your applications.

Wait, why do we need Kubernetes then? Well, every quite complex application has it’s own technological stack and different unique Continue Integration and Continue Deployment processes. So, if you work for a large enterprise which in turn has a lot of such custom made applications, there will be one day when the enterprise decides to make unification of rollout and upgrade processes to reduce costs and create special forces, which are responsible for deployment and maintenance. We start calling them DevOps.

Here is that moment, when everything becomes more and more complicated.

These guys have already started dreaming about better abstractions for unification of application deployment and invented a concept of Docker. The Docker is about having everything application needs to run in one ‘container’ which can be stored and transferred over a network. Nevertheless every nifty feature comes at its price. For the luxury of having platform independent movable containers we pay the price with much larger application size and extra build step. Both are very time and resource consuming.

Okay, now we have a bunch of containers, cool. How should we monitor all of them and restart when they fail? Moreover we also run containers across different servers and docker does not give us a way of how one part of our application in one container should connect across network and talk to a part of application in another container. There is nothing more than cleaning up failed docker containers and stalled images manually or in semi-automated, controlled by human, way.

And there was a blood. A lot of different third-party solutions and even Docker themselves were trying to compete and provide better tools for solving these problems. And finally more and more people started considering Kubernetes by Google as preferred solution.

Let me briefly describe a concepts of Kubernetes.

If you still have intention to try deployment to Kubernetes cluster, start playing with minikube and investigate this nice example of deployment Wordpress + MySql https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/

Originally published at blog.it-premium.com.ua.