قالب وردپرس درنا توس
Home / Tips and Tricks / What does Kubernetes do and when should you use it? – CloudSavvy IT

What does Kubernetes do and when should you use it? – CloudSavvy IT



Kubernetes Service

Kubernetes is a tool that manages all of the moving parts behind running apps in containers like Docker. This makes scaling your application very easy because your server infrastructure is separate from the code running on it.

What does Kubernetes do?

Kubernetes is often mentioned alongside Docker, but they each perform different roles. Docker packs applications and all their dependencies into individual files, known as container images, that can be run on a server without manual configuration. The Docker engine is similar to a virtual machine, but it is much leaner, more powerful, and simply designed 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 these are by far the most popular container format. Containers make it very easy to distribute your code without worrying about whether the server is configured to run the code properly.

A master Kubernetes server manages a cluster of work nodes. Any number of containers packed in Kubernetes pods can run on these working nodes. The master server takes care of provisioning pods on worker nodes and tries to maintain a set configuration. When your application has more traffic, Kubernetes can allocate more resources. If any of your servers run into problems, Kubernetes can move the pods on that server to the rest of the network while you troubleshoot the problem.

The master Kubernetes server manages a cluster of worker nodes running any number of containers packed in Kubernetes pods.
Kubernetes worker nodes running multiple pods.

Although Kubernetes offers many of the functions of a Platform as a Service (PaaS) system, it does not provide any hardware. Kubernetes is pure software and open source. PaaS systems such as AWS EKS are based on Kubernetes and in many cases offer the option of providing more resources for yourself (automatic scaling).

Why use Kubernetes?

Kubernetes brings all the benefits of Docker and containerization in general. Using containers, you can organize and manage your code with all its dependencies in one place. Your code runs the same way in a development and test environment as it does in production, no surprises.

The Docker images that run on the Kubernetes platform are separate from the platform itself and have no idea that they run on Kubernetes pods. This decoupling of applications from the infrastructure makes Kubernetes extremely powerful as a replacement for your existing deployment cycle. You don’t have to worry if your code will run properly on your servers.

A fast development cycle puts more pressure on your ops team to think about how your code will actually run. If you’re having trouble managing the installation and configuration of your app on your servers when your code needs updating, Kubernetes can speed it up a lot.

And if you’re really not into configuring and managing servers, a managed Kubernetes service like AWS EKS can fix that problem and consider your app “serverless”.

How do i start

Kubernetes is service independent 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 worker nodes. They are all Kubernetes compatible, so you can switch between them with minimal hassle.

If you want to set it up yourself, you can do that with the kubeadm Toolbox. You need a master machine to run kubeadm on, which controls one or more running machines kubelet. The master computer manages the deployment of the container on the worker computers. For more information, see the Getting Started guide in the Kubernetes documents. However, prepare for a night of configuration.

AWS EKS is Amazon’s solution that enables Kubernetes apps to run in multiple AWS availability zones. EKS doesn’t require much configuration at all. All you have to do is provision new nodes. You pay $ 0.20 per hour ($ 150 per month) for each cluster running, plus the EC2 and EBS resources that your work nodes are consuming.

AWS EKS can run Kubernetes apps in multiple AWS availability zones

If you don’t need a full Kubernetes cluster but still want to run containerized apps, you can use the Elastic Container Service (ECS) from AWS. 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. This makes it easy to move from code in source control to containers deployed in your Kubernetes cluster.

Google is the original creator of Kubernetes, so naturally they offer a managed Kubernetes service through the Google Cloud Platform.


Source link