If you are familiar with containers, then you surely have already heard of Kubernetes It is the most popular orchestrator for containers management and for the record, Kubernetes was created by Google who then donated it to the Cloud Natives Computing Foundation So now it's an open tool source and in this video I will explain the essentials to remember from Kubernetes! Come on, it's now, and go my cookie! To understand what is Kubernetes, you must first know what a container is.
Basically, container virtualization is a partitioning method at the OS level and is based on the technology of linux virtualization LXC (Linux Containers). The principle is to make run isolated Linux environments in containers while sharing the same core linux (the kernel), The container only virtualizes the runtime environment like the processor, RAM or the file system) and does not virtualize the whole machine including a new OS like a VM. The container is therefore lighter than the VM which creates a lot more containers than VMs on the same server Docker is an example of container virtualization technologies Besides, if you want know more about containers and especially Docker, I invite you to see the dedicated video on my channel Note that for the rest of the video, I take the example of Docker containers to illustrate the functionalities of Kubernetes As a container is strongly connected to the kernel, the container is not aware of what's going on outside of that kernel and therefore from the host machine, that's where Kubernetes intervenes : it is Kubernetes who will bring the orchestration and the container management on server clusters in other words, Kubernetes allows you to support multiple kernels and therefore to be able to manage the containers on these different Linux host servers whether physical or virtual or located in public, private or hybrid cloud Orchestration features allows you to create application services that this either Front-End or Back-End and this on their containers Kubernetes also allows you to plan the execution of these containers in a cluster, and guarantee their integrity over time And finally to ensure their monitoring with Kubernetes, the developer does'nt need anymore to deal with VM management.
He directly has his runtime environment which is the container to deploy his code And it's Kubernetes who's going take care of the underlying infrastructure layers With Kubernetes, the developer no longer has to deal with infrastructure layers it didn't need to know where the apps are And the underlying infrastructure being hidden from the developer Now let's see the major components of Kubernetes architecture First there is the Kubernetes master which is the server controlling the nodes and nodes are slave nodes which are actually machines hosting docker hosts running tasks assigned to them. Pods run within the nodes The pod is a runtime environment one or more docker containers and it's the master who will say what node will run an unordered pod based on the availability of resources The master manages the use of resources on each node in order to ensure that the workload is not not in excess of resources available to accomplish this goal Kubernetes needs to know available resources and those currently assigned on servers and this information is provided by the kubelets, the kubelet is a component executed on nodes and which ensures that the defined containers have started and are operating as expected. If it falls, the Kubelet component will report it to the master and it is precisely the master who checks the number of identical copies requested of a a pod that should run in the cluster, the master therefore manages also the resilience of pods.
Let's take an example: let's say that the two first pods on your right are replicas. This pod model was defined in the master as having to be present in duplicate on this cluster suddenly if the node falls, Kubernetes will run this pod in another available node horizontal scalability will be performed by instantiating the application in multiple nodes and now we will see in more detail what there is in these nodes: the pod is therefore a runtime environment which can contain one or more Docker containers , we're going to deploy two containers on the same pod if necessary to share local resources. Indeed all the containers of a pod share the same IP address, the same network legs and others pod resources Another important concept is the volume, it is a storage space accessible to all containers on a pod and it meets two needs The first is the need to preserve beyond the life cycle of a container data and files.
A container is ephemeral therefore if the data used by containers should be kept beyond the life cycle of a container, this data will be stored in the volume Then volume is needed for sharing data between two containers When several containers run in the same node, it is often necessary to share files and data and it was done via volume. let's go now to the concept of service Service in Kubernetes is an entry point allowing load balanced access to a group of identical containers In other words it is a VIP (Virtual IP), Kubernetes will provide a routing service by assigning a IP address and a domain name to a service and will balance the load of the traffic to different nodes. Service requests are then transferred by Kubernetes to service pods.
These services correspond to third party applications ie frontend like here with the web server or backend with BDD service To finish, let's see how does it all work Kubernetes runs at above the OS and interacts with them container pods that run on the knots, The Kubernetes master receives orders from a DevOps administrator or team and will relay these instructions to the nodes. This transfer system works with services The most suitable node for this task will be chosen automatically He will then allocate resources to pods designated in this node to perform the required task. When the master plans a pod in a node, The kubelet of this node orders Docker to launch specified containers and it's Docker who goes start or stop containers.
The kubelet then continuously collects the status of these containers via docker and collects this information on the Master server. so we see that with Kubernetes, orders come from an automated system and no longer from an administrator who will manually assign tasks at all nodes for each container Finally, here are some examples that will show you the importance of Kubernetes in the container ecosystem the first example is AWS which integrated Kubernetes commeservice in its catalog called Elastic Kubernetes Service (EKS) Another significant example is Docker, who has his own house orchestrator called Docker Swarm, competitor of Kubernetes, But despite everything, Docker leaves the possibility to choose between Kubernetes or Docker swarm Finally, Redhat integrated it into its range of PaaS Openshift which therefore combines Kubernetes and Docker here is this video is finished, I hope it helped you I hope you liked it, if that's the case, As usual, put an inch blue, give me your opinion in the comments and if you haven't already done so, subscribe! And we see you soon!
Ciao!