Kubernetes

Kubernetes
Initial release 6 June 2014 (2014-06-06)[1]
Stable release 1.2.3[2] / April 22, 2016 (2016-04-22)
Development status Active
Written in Go
Operating system Cross-platform
Type Cluster management software
License Apache License 2.0
Website kubernetes.io

Kubernetes is an open source container cluster manager originally designed by Google and donated to the Cloud Native Computing Foundation. It aims to provide a "platform for automating deployment, scaling, and operations of application containers across clusters of hosts".[3]

History

Kubernetes (from κυβερνήτης: Greek for "helmsman" or "pilot") was first announced by Google in 2014.[4] Its development and design are heavily influenced by Google's Borg system,[5] and many of the top contributors to the project previously worked on Borg. Kubernetes v1.0 was released on July 21, 2015.[6] Along with the Kubernetes v1.0 release, Google partnered with the Linux Foundation to form the Cloud Native Computing Foundation (CNCF)[7] and offered Kubernetes as a seed technology.

Design

Kubernetes defines a set of building blocks ("primitives") which collectively provide mechanisms for deploying, maintaining, and scaling applications. The components which make up Kubernetes are designed to be loosely coupled and extensible so that it can meet a wide variety of different workloads. The extensibility is provided in large part by the Kubernetes API, which is used by internal components as well as extensions and containers running on Kubernetes.[8]

Pods

The basic scheduling unit in Kubernetes is a "pod". A pod consists of one or more containers that are guaranteed to be colocated on the host machine and can share resources.[8] Each pod in Kubernetes is assigned a unique (within the cluster) IP address, which allows applications to use ports without the risk of conflict.[9] A pod can define a volume, such as a local disk directory or a network disk, and expose it to the containers in the pod.[10] Pods can be manually managed through the Kubernetes API, or their management can be delegated to a controller.[8]

Labels and Selectors

Kubernetes allows clients (users or internal components) to attach key-value pairs called “labels” to any API object in the system, such as pods and nodes. Correspondingly, “label selectors” are queries against labels that resolve to matching objects.[8] Labels and selectors are the primary grouping mechanism in Kubernetes, and are used to determine which components to apply an operation to.[11] For example, if the Pods of an application have labels for “tier” (front-end, back-end, etc.) and “release_track” (canary, production, etc.), then an operation on all of the back-end canary nodes could use a selector tier=back-end AND release_track=canary.[12]

Controllers

A controller is a reconciliation loop that drives actual cluster state toward the desired cluster state.[13] It does this by managing a set of pods. One kind of controller is a Replication Controller, which handles replication and scaling by running a specified number of copies of a pod across the cluster. It also handles creating replacement pods when the node a pod is running on fails.[13] Other controllers that are part of the core Kubernetes system include a “DaemonSet controller” for running exactly one pod on every machine (or some subset of machines), and a “Job controller” for running pods that run to completion, e.g. as part of a batch job.[14] The set of pods that a controller manages is determined by label selectors that are part of the controller’s definition.[12]

Services

A Kubernetes service is a set of pods that work together, such as one tier of a multi-tier application. The set of pods that constitute a service are defined by a label selector.[8] Kubernetes provides service discovery and request routing by assigning a stable IP address and DNS name to the service, and round-robin load balances network connections to that IP address among the pods matching the selector (even as failures cause the pods move from machine to machine).[9] By default a service is exposed inside a cluster (e.g. back end pods might be grouped into a service, with requests from the front-end pods load-balanced among them), but a service can also be exposed outside a cluster (e.g. for clients to reach frontend pods)[15]

Architecture

The components of Kubernetes can be divided into those that manage an individual node and those that are part of the control plane.[8][16]

Kubernetes node

The node is a single machine (or virtual machine) being managed by Kubernetes. Every node in the cluster must run the container runtime (such as Docker), as well as the Kubelet and the kube-proxy. The Kubelet is responsible for starting, stopping, and maintaining application containers (organized into pods) as directed by the control plane.[8][17] The kube-proxy is an implementation of a network proxy and a load balancer, and it supports the service abstraction along with other networking operations[8]

Kubernetes control plane

The Kubernetes control plane consists of various components, each its own process, which currently run on a single master node. The apiserver serves the kubernetes API using JSON over HTTP, which provides both the internal and external interface to Kubernetes.[8][18] The api server writes the cluster state to etcd, the persistent data store backing Kubernetes. The scheduler is the pluggable component that selects which node an unscheduled pod should run on. The controller manager is the process that the core Kubernetes controllers run in. The controllers communicate with the API server to create, update, and delete the resources they manage (pods, service endpoints, etc.)[18]

References

  1. "First GitHub commit for Kubernetes". github.com. 2014-06-07.
  2. "GitHub Releases page". github.com. 2016-04-22.
  3. "What is Kubernetes". Kubernetes. Retrieved 28 August 2015.
  4. "Google Open Sources Its Secret Weapon in Cloud Computing". Wired. Retrieved 24 September 2015.
  5. Abhishek Verma; Luis Pedrosa; Madhukar R. Korupolu; David Oppenheimer; Eric Tune; John Wilkes (April 21–24, 2015). "Large-scale cluster management at Google with Borg". Proceedings of the European Conference on Computer Systems (EuroSys).
  6. "As Kubernetes Hits 1.0, Google Donates Technology To Newly Formed Cloud Native Computing Foundation". TechCrunch. Retrieved 24 September 2015.
  7. "Cloud Native Computing Foundation".
  8. 1 2 3 4 5 6 7 8 9 "An Introduction to Kubernetes". DigitalOcean. Retrieved 24 September 2015.
  9. 1 2 Langemak, Jon (2015-02-11). "Kubernetes 101 – Networking". Das Blinken Lichten. Retrieved 2015-11-02.
  10. Strachan, James (2015-05-21). "Kubernetes for Developers". Medium (publishing platform). Retrieved 2015-11-02.
  11. Surana, Ramit (2015-09-16). "Containerizing Docker on Kubernetes". LinkedIn. Retrieved 2015-11-02.
  12. 1 2 "Intro: Docker and Kubernetes training - Day 2". Red Hat. 2015-10-20. Retrieved 2015-11-02.
  13. 1 2 "Overview of a Replication Controller". Documentation. CoreOS. Retrieved 2015-11-02.
  14. Sanders, Jake (2015-10-02). "Kubernetes: Exciting Experimental Features". Livewyer. Retrieved 2015-11-02.
  15. Langemak, Jon (2015-02-15). "Kubernetes 101 – External Access Into The Cluster". Das Blinken Lichten. Retrieved 2015-11-02.
  16. "Kubernetes Infrastructure". OpenShift Community Documentation. OpenShift. Retrieved 24 September 2015.
  17. Marhubi, Kamal (2015-08-27). "What [..] is a Kubelet?". kamalmarhubi.com. Retrieved 2015-11-02.
  18. 1 2 Marhubi, Kamal (2015-09-26). "Kubernetes from the ground up: API server". kamalmarhubi.com. Retrieved 2015-11-02.

External links

This article is issued from Wikipedia - version of the Thursday, May 05, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.