Kubernetes (from other Greek: κυβερνήτης - “ helmsman ”, “ helmsman” [6] , the numerononym K8s [6] is often also used) is open source software for automating the deployment, scaling, and management of containerized applications [7] . It supports basic containerization technologies, including Docker , rkt , and hardware virtualization technologies are also possible [8] .
| Kubernetes | |
|---|---|
| Type of | |
| Developer | |
| Written on | |
| operating system | |
| First edition | |
| Latest version | |
| License | |
| Site | |
The original version was developed by Google for internal needs, subsequently the system was transferred under the control of the Cloud Native Computing Foundation . They are used by a number of large organizations and Internet projects, in particular, the infrastructure of the Wikimedia Foundation has been moved from independently developed cluster management software to Kubernetes.
Content
History
The main developers of the first versions of the internal Google system are the programmers Joe Beda , Brendan Burns and Craig McLuckie [9] , later their colleagues Brian Grant and Tim Hawkin ( Tim Hockin ). The main system programming language is Go . The development and internal ideology of Kubernetes was seriously affected by another Google product, which remained an internal development - the Google Borg cluster management system [10] [11] , which a number of key Kubernetes developers had previously worked on.
The original name of the project is Project Seven (a reference to the heroine of the Star Trek series, returned to an individual and friendly state from the status of a member of the inhuman swarm cybernetic mind of the Borg Collective ) [12] ; seven pens on the helm of the project logo - an allusion to this artistic image.
In mid-2014, the source codes of the project were published [13] . July 21, 2015 released version 1.0 [14] ; after which Google, in partnership with the Linux Foundation, organized a special Cloud Native Computing Foundation (CNCF) [15] , to which the corporation transferred Kubernetes as an initial technological contribution.
Concepts
Like many other complex products, Kubernetes introduces a number of specific concepts and concepts within its ecosystem.
A node is a separate physical or virtual machine on which application containers are deployed and run. Each node in the cluster contains services for launching applications in containers (for example, Docker ), as well as components designed for centralized management of the node.
Under ( pod , from the English - “pod, cocoon”, also a module ) - the basic unit for managing and running applications, one or more containers that are guaranteed to run on one node, resource sharing is provided [16] , interprocess communication and a unique within the cluster, the IP address [17] . The latter allows applications deployed on the hearth to use fixed and predefined port numbers without the risk of conflict. Pods can be directly controlled using the Kubernetes API , or they can be transferred to the controller [16] .
Volume is a shared storage resource for sharing from containers deployed within the same hearth.
All control objects (nodes, pods, containers) in Kubernetes are marked with labels ( label ), label selectors ( label selector ) are requests that allow you to get a link to objects that correspond to some of the labels [16] ; tags and selectors are Kubernetes' main mechanism, which allows you to choose which object to use for the requested operation.
A service in Kubernetes is a collection of logically related sets of hearths and access policies for them. For example, a service may correspond to one of the layers of software designed in accordance with the principles of a layered software architecture. The set of hearths corresponding to the service is obtained by performing the selector of the corresponding label [16] .
Kubernetes provides functions for detecting services and routing on demand, in particular, the system can reassign the IP address and domain name of the service necessary for accessing the service to the various submissions included in it. This ensures load balancing between the pods whose labels correspond to the service in the style of Round robin DNS , as well as correct operation in the event that one of the cluster nodes is out of order and the pods placed on it automatically move to the other. [17] By default, the service is available inside a Kubernetes-managed cluster, for example, backend pods are grouped to provide load balancing and the frontend is provided in this form, but it can also be configured to provide access to its pods from the outside, as a single frontend. [18]
A controller is a process that controls the state of a cluster, trying to bring it from the actual to the desired [19] ; he does this by operating with a set of hearths, which is determined using label selectors that are part of the controller definition [20] . Controller execution is provided by the Kubernetes Controller Manager component. One of the types of controllers, the most famous is the Replication Controller , which provides scaling by running the specified number of hearth copies in the cluster. It also enables the launch of new instances of the hearth, in the event that the node running the host under this controller fails. [19] Other controllers that are part of the main Kubernetes system include the DaemonSet Controller, which provides start-up the hearth on each machine (or a subset of the machines) and the Job Controller to run the hearths, which are executed before completion, for example, as part of a batch job.
Operators are a specialized type of Kubernetes software intended for inclusion in a cluster of services that maintain their state between executions ( stateful , such as DBMSs, monitoring or caching systems [21] . The purpose of the operators is to provide the ability to manage stateful applications in the Kubernetes cluster transparent to the way and hide the details of their settings from the main Kubernetes cluster management process.
Architecture and components
The system implements the master-slave architecture: a cluster management subsystem is allocated, and some components control individual, slave nodes (called Kubernetes nodes themselves) [16] [22] .
Management Subsystem
The management subsystem provides load balancing and communication within the cluster; the components of the subsystem can be performed on one or several parallel operating host nodes that jointly provide high availability mode [22] .
is the component of the management subsystem that is responsible for the consistent storage of cluster configuration data, in a sense, is the distributed equivalent of the directory / etc of Unix systems. Implemented as a lightweight distributed NoSQL DBMS of the "key-value" class; created as part of the CoreOS project.
The API server is a key component of the management subsystem that provides REST -style APIs (using JSON communication over HTTP transport) and is used to organize external and internal access to Kubernetes functions [16] . The API server updates the state of objects stored in etcd, allowing its clients to control the distribution of containers and load between nodes of the managed system.
Scheduler ( scheduler ) - a component of the management subsystem that selects on which node the specific sub should run based on the criteria for the availability of resources. The scheduler monitors the use of resources on each of the nodes, ensuring load balancing so that it does not exceed the available amount of resources. For this purpose, the scheduler should have information about the resources available on each node, the requirements for them from managed pods, as well as various additional user restrictions and policies, such as QoS , affinity and anti-affinity requirements (links or decouples) management objects with each other), . In other words, the role of the scheduler is to find and provide resources depending on requests arising in connection with the download [23] .
Controller manager is the process that runs the main Kubernetes controllers, such as DaemonSet Controller and Replication Controller. The controllers interact with the Kubernetes API server, creating, updating and deleting the resources they manage (pods, service entry points, and others).
Kubectl is a command line interface , along with an API that provides management of resources controlled by Kubernetes.
Node Components
The operation procedure of Kubernetes consists in the fact that the resources of the nodes are dynamically distributed between the pods executed on them. Each node in the cluster contains a number of typical components.
The service for launching containers provides functions for executing containers of the appropriate type (depending on the type of container engine used). From the point of view of the Kubernetes software environment, containers are encapsulated in pods, while the containers themselves are the most low-level software components that Kubernetes software interacts with. They, in turn, contain executable applications, libraries, and other resources necessary for the operation of these applications. For the outside world, containers are available through an IP address assigned to each of the containers.
Kubelet is responsible for the status of the execution of the hearths on the node - it monitors whether each of the containers runs correctly while in working condition. Kubelet provides start, stop and management of application containers organized in pods. Functionally, Kubelet can be considered as an analogue of supervisord [16] [24] . If it is discovered that one of the hearths is in the wrong state, the component tries to redeploy it and restart it on the node. The status of the node itself is sent to the management subsystem every few seconds in the form of diagnostic messages ( heartbeat message ). If the master node, based on the content of these messages or their absence, detects that a particular node is not working properly, the Replication Controller management subsystem process tries to restart the necessary pods on another node that is in working condition.
Kube-proxy - a component that is a combination of a network proxy server and a load balancer . The network-level operations implemented in it use the service abstraction [16] . He is responsible for routing incoming traffic to specific containers that operate within the hearth located on the node. Routing is provided based on the IP address and port of the incoming request.
cAdvisor is an agent of the Kubernetes internal monitoring system that collects performance metrics and information about the use by containers operating within the node of such resources as the CPU time, RAM, and the load on the file and network systems.
Development and deployment
Kubernetes provides a number of tools for integrating the development and deployment of software running on this system. Among the most commonly used tools for this purpose:
- Minikube - a specialized Kubernetes configuration intended for deployment on a local machine, for example, a developer's computer, used to study and local experiments on Kubernetes;
- Helm is the official Kubernetes package manager, the functional equivalent of apt-get and yum [25] ;
- Monocular is a web-based interface for managing packages packaged in accordance with Helm standards.
For each of these tools, there is a certain range of alternatives, for example, as a direct replacement for Helm, the Terraform application infrastructure deployment system is used [26] . There is an opposite approach adopted by Helm developers, which involves moving Kubernetes resource files to a repository, for example, in git and further working with them as a kind of specific code (this is the way the kubecfg project offers this method of work).
Distribution and Competition
Many of the container management system vendors have implemented Kubernetes support in their products, some of which have participated in CNCF . In particular, included Kubernetes in the distribution of its container management system Rancher container management platform [27] , used Kubernetes in the Pivotal Container Service (PKS) product [28] , Red Hat as part of PaaS- systems [29] [30] (which is essentially an extended version of Kubernetes, often referred to as the “Kubernetes distribution”), CoreOS included the system in the commercial version of the Container Linux Tectonic distribution, and IBM used it in the IBM Cloud Container Service [31] [32] and in the product of IBM Cloud Private [33] [34] [35] . Oracle joined the Cloud Native Computing Foundation in September 2017 and included Kubernetes on Oracle Cloud and Oracle Linux [36] .
It is believed that by the end of the 2010s Kubernetes became the de facto standard for using cloud systems and services according to the PaaS model, which provide for containerization of applications, in particular, it is the main containerization services of a number of the largest public cloud providers - Amazon ( AWS Elastic Container Service) , Microsoft ( Microsoft Azure Containers), Google ( Google Cloud Platform Kubernetes Engine).
At the same time, alternative products for orchestrating containerized applications are developing - from the developer Docker and Nomad from . Compared to Docker Swarm, Kubernetes is functionally richer, but has a higher threshold for entering technology. When switching from Docker Swarm to Kubernetes, you must use the Kompose application to convert the orchestration description files created in Docker Compose into a format supported by Kubernetes.
Notes
- ↑ http://kubernetes.io/
- ↑ https://github.com/kubernetes/kubernetes/search?l=go
- ↑ The kubernetes Open Source Project on Open Hub: Languages Page - 2006.
- ↑ Release 1.15.2 - 2019.
- ↑ https://github.com/kubernetes/kubernetes/blob/master/LICENSE
- ↑ 1 2 What is Kubernetes (K8s)? . Dialogic Glossary of Telecom Terms . Date of treatment October 10, 2017. Archived October 11, 2017.
- ↑ kubernetes / kubernetes (English) . Github Date of treatment March 28, 2017. Archived April 21, 2017.
- ↑ The Kubevirt extension provides the ability to run hearths not based on Docker, but on the basis of any virtual machines supported by libvirt .
- ↑ Google Made Its Secret Blueprint Public to Boost Its Cloud (unspecified) ? . Date of treatment June 27, 2016. Archived July 1, 2016.
- ↑ Abhishek Verma; Luis Pedrosa; Madhukar R. Korupolu; David Oppenheimer; Eric Tune John Wilkes Large-scale cluster management at Google with Borg (neopr.) // Proceedings of the European Conference on Computer Systems (EuroSys). - 2015 .-- April 21. Archived July 27, 2017.
- ↑ Borg, Omega, and Kubernetes - ACM Queue . queue.acm.org . Date of treatment June 27, 2016. Archived July 9, 2016.
- ↑ Early Stage Startup Heptio Aims to Make Kubernetes Friendly .
- ↑ Google Open Sources Its Secret Weapon in Cloud Computing . Wired . Date of treatment September 24, 2015. Archived on September 10, 2015.
- ↑ As Kubernetes Hits 1.0, Google Donates Technology To Newly Formed Cloud Native Computing Foundation . TechCrunch . Date of treatment September 24, 2015. Archived September 23, 2015.
- ↑ Cloud Native Computing Foundation . Archived July 3, 2017.
- ↑ 1 2 3 4 5 6 7 8 An Introduction to Kubernetes Neopr . DigitalOcean . Date of treatment September 24, 2015. Archived October 1, 2015.
- ↑ 1 2 Langemak, Jon Kubernetes 101 - Networking . Das Blinken Lichten (February 11, 2015). Date of treatment November 2, 2015. Archived October 25, 2015.
- ↑ Langemak, Jon Kubernetes 101 - External Access Into The Cluster . Das Blinken Lichten (February 15, 2015). Date of treatment November 2, 2015. Archived on October 26, 2015.
- ↑ 1 2 Overview of a Replication Controller . Documentation CoreOS Date of treatment November 2, 2015. Archived on September 22, 2015.
- ↑ Intro: Docker and Kubernetes training - Day 2 . Red Hat (October 20, 2015). Date of treatment November 2, 2015. Archived on October 29, 2015.
- ↑ Introducing Operators: Putting Operational Knowledge into Software // CoreOS
- ↑ 1 2 Kubernetes Infrastructure . OpenShift Community Documentation . OpenShift Date of treatment September 24, 2015. Archived July 6, 2015.
- ↑ The Three Pillars of Kubernetes Container Orchestration - Rancher Labs . rancher.com (May 18, 2017). Date of treatment May 22, 2017. Archived June 24, 2017.
- ↑ Marhubi, Kamal What [.. is a Kubelet?] . kamalmarhubi.com (August 27, 2015). Date of treatment November 2, 2015. Archived November 13, 2015.
- ↑ Using Helm to deploy to Kubernetes (English ) ? . daemonza.imtqy.com. Date of treatment February 23, 2018.
- ↑ Harshal Shah. Terraform vs. Helm for Kubernetes // DZone. - 2017 .-- November 2.
- ↑ Deploy and Manage Kubernetes Clusters | Rancher Labs , Rancher Labs . Archived on April 16, 2017.
- ↑ Software, Pivotal Pivotal Container Service (PKS) (neopr.) . pivotal.io (January 17, 2017). Date of treatment February 14, 2018.
- ↑ OpenShift v3 Platform Combines Docker, Kubernetes unopened . blog.openshift.com . Date of treatment August 14, 2014. Archived July 6, 2015.
- ↑ Why Red Hat Chose Kubernetes for OpenShift . blog.openshift.com . Date of treatment November 7, 2016. Archived February 21, 2017.
- ↑ IBM Launches Bluemix Container Service with Kubernetes to Fuel Highly Secure and Rapid Development of Cognitive Apps (unspecified) ? . ibm.com . Date of treatment November 21, 2017.
- ↑ IBM chases Google, Microsoft with Kubernetes in the cloud (English ) ? . infoworld.com . Date of treatment November 21, 2017.
- ↑ IBM Announces IBM Cloud Private (English ) ? . ibm.com . Date of treatment November 1, 2017. Archived November 1, 2017.
- ↑ IBM Cloud Private brings cloud native computing to your data center (English ) ? . techcrunch.com . Date of treatment November 2, 2017. Archived November 3, 2017.
- ↑ IBM Cloud Private launches with bet open architecture wins hybrid cloud scrum (English ) ? . zdnet.com . Date of treatment November 2, 2017. Archived November 3, 2017.
- ↑ Oracle Joins Cloud Native Computing Foundation as Platinum Member - Cloud Native Computing Foundation (English) , Cloud Native Computing Foundation (September 13, 2017).
Literature
- Luksha M. Kubernetes in Action = Kubernetes in Action. - M .: DMK Press , 2018 .-- 672 p. - ISBN 978-5-97060-657-5 .
Links
- Official site
- Kubernetes Project on GitHub
- Kubernetes By Example Kubernetes manual developed by the OpenShift team.
- The Kubeapps hub is a directory of application configuration files prepared for their launch in Kubernetes.