Kubernetes (generally distillation as K8s ) is an open-source orchestration container system to automate deployment, scaling, and managing packaged applications. Originally designed by Google and now managed by the Cloud Native Computing Foundation. It aims to provide "platform to automate deployment, scale, and operation of application containers across host clusters". It works with a variety of container tools, including Docker.
Video Kubernetes
History
Kubernetes (????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????? ?????????????????????? was first announced by Google in mid 2014. Its development and design was heavily influenced by Google's Borg system, and many of the top contributors to previously working projects on Borg The original code name for Kubernetes in Google is Project Seven, a reference to the Star Trek Seven of Nine character which is a 'friendly' Borg.The seven fingers on the Kubernetes logo wheel are a nod to the code name.
Kubernetes v1.0 was released on July 21, 2015. Along with the release of Kubernetes v1.0, Google partnered with the Linux Foundation to form the Cloud Native Computing Foundation (CNCF) and offer Kubernetes as a seed technology.
Kubernetes is being used in a number of vendor solutions including Microsoft for Azure Kubernetes Service (AKS), Mesosphere for DC/OS products, Rancher Labs for its container management platform, Pivotal for its MCC products, Red Hat for its OpenShift product, CoreOS for its Tektonik products , Mirantis for its Mirantis Cloud Platform, IBM for IBM Cloud Kubernetes (IKS) Services and IBM Cloud Private products, Rackspace for managed Kubernetes as a Service and Giant Swarm for managed Kubernetes. Oracle joined the Cloud Native Computing Foundation as a platinum member on September 13, 2017. Oracle opened the Kubernetes installer source for Oracle Cloud Infrastructure and released Kubernetes on Oracle Linux.
Maps Kubernetes
Design
Kubernetes defines a set of building blocks ("primitive"), which collectively provide mechanisms for deploying, maintaining, and shrinking applications. The components that make up Kubernetes are designed to be loosely coupled and can be expanded to meet a variety of different workloads. This extension is provided largely by the Kubernetes API, which is used by internal components as well as extensions and containers that run on Kubernetes.
Pods
The basic scheduling unit in Kubernetes is called a "pod". This adds a higher level of abstraction by grouping the components in the container. Pods consist of one or more containers that are guaranteed to be placed together on a host machine and can share resources. Each pod in Kubernetes is assigned a unique IP address in the cluster, allowing applications to use ports without risk of conflict. Pods can specify a volume, such as local disk directory or network disk, and expose it to the container in a pod. Pods can be manually managed via the Kubernetes API, or their management can be delegated to the controller.
Labels and selectors
Kubernetes allows clients (users or internal components) to attach a key-value pair called "label" to any API object in the system, such as pods and nodes. Correspondingly, "label selector" is a query against a completed label to a matching object.
Labels and selectors are the main clustering mechanisms in Kubernetes, and are used to determine the components that apply to an operation.
For example, if the app Pods have labels for the tier
system (" front-end
", " back-end
", for example) and release_track
(" canary
", " production
", for example), then operations on all " back-end
" and " canary
"node can use the label selector as follows:
tier = back-end DAN release_track = canary
Pengontrol
The controller is a reconciliation loop that pushes the actual cluster state to the desired cluster state. It does this by managing a set of pods. One type of controller is the "Replication Controller," which handles replication and scaling by running copies of specified pods across clusters. It also handles creating a replacement pod if the underlying node fails. Other controllers that are part of the core Kubernetes system include "DaemonSet Controller" to run exactly one pod on each machine (or parts of a machine), and "Work Controller" to run a running pod to completion, e.g. as part of a batch job. A set of managed pod controllers is determined by the label selector that is part of the controller definition.
Services
The Kubernetes service is a set of pods that work together, like a single tiered multi-tier application. The collection of pods that make up the service is determined by the label selector. Kubernetes provides service discovery and query routing by assigning a stable IP address and DNS name to the service, and loading round-robin balance traffic to a network connection from an IP address between pods matching the selector (even as a failure causes the pod to move from the machine to the machine). By default services are exposed in clusters (eg back end pods can be grouped into services, with requests from front-end pods having a load balanced between them), but services can also be exposed outside the cluster (for example for clients to reach frontend pods )
Architecture
Kubernetes follows the master-slave architecture. The Kubernetes component can be divided into components that manage individual nodes and that are part of the control plane.
Kubernetes plane control
The Kubernetes Master is the main control unit of the cluster that manages its workload and directs communication across the system. The Kubernetes control plane consists of various components, each process itself, which can run either on a single master node or on some master that supports high availability clusters. The various components of the Kubernetes control plane are as follows:
etcd
etcd is a continuous, light, distributed, key value data storage developed by CoreOS that reliably stores configuration data from a cluster, representing the overall cluster state at a given point in time. Other components notice changes in this store to bring themselves to the desired state.
Server API
The API server is a major component and serves the Kubernetes API using JSON over HTTP, which provides both internal and external interfaces to Kubernetes. The API server processes and validates REST requests and updates the state of the API objects in the dlld, allowing clients to configure workloads and containers throughout the Worker node.
Scheduler
Scheduler is a pluggable component that selects which nodes are not scheduled (the basic entities managed by the scheduler) must run on the availability of resources. Scheduler tracks resource utilization at each node to ensure that the workload is not scheduled to exceed the available resources. For this purpose, the scheduler must know the resource requirements, resource availability, and other user-provided constraints and policy directives such as service quality requirements, affinity/anti-affinity, data locality, and so on. In essence, the role of the scheduler is to match "supply" resources with "demand" workload.
Controller manager
The controller manager is a process in which the core Kubernetes controllers such as DaemonSet Controller and Replication Controller are run. The controller communicates with the API server to create, update and delete the resources they manage (pod, service endpoint, etc.)
Kubernetes knot
The Node, also known as Worker or Minion, is the machine in which the container (workload) is deployed. Each node in the cluster must run a container runtime such as the Docker, as well as the components mentioned below, for communication with the master for network configuration of this container.
Kubelet
Kubelet is responsible for running the status of each node, ensuring that all containers in the node are healthy. It takes care of starting, stopping, and maintaining the application container set into a pod as directed by the control plane.
Kubelet monitors the pod state and if it is not in the desired state, the pod will be moved to the same node. The status of the node is passed every few seconds through heartbeat messages to the master. Once the master detects a node failure, the Replication Controller observes this state change and launches the pod on other healthy nodes.
Container
A container is inside Pod. The container is the lowest level of the micro services that hold the running applications, libraries and their dependencies. Containers can be exposed to the world via an external IP address.
Kube-proxy
The Kube-proxy is an implementation of the network proxy and load balancer, and supports service abstraction along with other network operations. It's responsible for driving traffic to the right container based on the IP number and port of the incoming request.
cAdvisor
cAdvisor is an agent that monitors and collects resource usage and performance metrics such as CPU, memory, file, and usage of container networks on each node.
References
External links
- Official website
- kubernetes in GitHub
Source of the article : Wikipedia