Kubernetes is a tool that handles all moving parts behind running apps in containers like Docker. This makes it easy to scale your application, as your server infrastructure is separate from the code running on it.
What does Kubernetes do?
Kubernetes is often mentioned along with Docker, but they each perform different tasks. Docker packages applications and all their dependencies in single files, so-called container images, which can be run on a server without any manual configuration. The Docker engine is similar to a virtual machine, but is much narrower and more performance, designed simply to run a single application in an isolated environment.
Kubernetes is an orchestration engine and provides a platform for running Docker images. It supports the use of Docker images, as they are by far the most popular container format. Containers allow your code to be deployed very easily without worrying about the server being configured to run the code properly.
A master Kubernetes server handles a cluster of worker nodes. These worker nodes can run any number of containers packed in Kubernetes Pods. The master server handles the distribution of Pods on worker nodes and tries to maintain a set of configuration. If your application encounters more traffic, Kubernetes may provide more resources, and if one of your servers encounters problems, Kubernetes may move Pods on that server to the rest of the network while you fix the problem.
But while Kubernetes provides many features in a PaaS (Platform as a Service) system, it does not provide any hardware. Kubernetes is pure software and is open source. PaaS systems such as AWS EKS are built on top of Kubernetes and in many cases offer the ability to provide more resources for themselves (automatic scaling).
Why use Kubernetes?
Kubernetes brings all the benefits of Docker and containerization in general. Containers help keep your code organized and managed, with all the dependencies in one place. Your code will run the same in a development and test environment as it does in production, no surprises.
The Docker images running on the Kubernetes platform are separate from the platform itself and have no idea that they are running in Kubernetes pods. This disconnection of applications from infrastructure makes Kubernetes extremely powerful as a replacement for your existing distribution cycle. You do not have to worry about whether your code will run properly on your servers.
A fast development cycle puts more pressure on your Ops team to worry about actually running your code. If you have trouble managing the installation and configuration of your app across your servers every time your code needs updating, Kubernetes can do it much faster.
And if you really do not like configuring and managing servers, a managed Kubernetes service like AWS EKS can alleviate the problem and make your app “server free”.
How do I get started?
Kubernetes is a service agnostic, so you can set it up on your own servers if you want. However, Kubernetes is quite complicated, so there are many turnkey solutions from the major cloud providers that use their resources to power your workforce nodes. They will all be Kubernetes compatible, so you can switch between them with minimal hassle.
If you want to set it yourself, you can do it with
kubeadm toolbox. You need a main engine to drive
kubeadm on, which controls one or more working machines running
kubelet. The main machine handles the distribution of the container to the work machines. You can read their start guide in the Kubernetes documents for more information, but be prepared for an evening of configuration.
AWS EKS is Amazon’s solution that can run Kubernetes apps in multiple AWS accessibility zones. EKS does not require much configuration at all; all you need to do is provide new nodes. You pay $ 0.20 per hour ($ 150 per month) for each ongoing cluster, as well as pay for the EC2 and EBS resources that your worker nodes consume.
If you do not need a complete Kubernetes cluster but still want to run container apps, you can use the AWS Elastic Container Service (ECS). ECS runs Docker containers and has its own scaling system.
Microsoft’s Azure Kubernetes Service (AKS) is a managed Kubernetes service that integrates well with an Azure pipeline, making it easy to go from source control code to containers distributed across your Kubernetes cluster.
Google is the original creator of Kubernetes, so of course they offer a managed Kubernetes service through the Google Cloud Platform.