kubernetes (k8s) container cluster management

Kubernetes Introduction

Kubernetes is google in June 2014 a container open source cluster management system, using a go-language development, Kubernetes also known k8s.
k8s google is inside a container called borg cluster management system derived from, borg 10 years old in google large-scale production run.
k8s mainly used for automation to deploy, scale and manage container application, provides resource scheduling, deployment management, service discovery, expansion of volume reduction, monitoring and other functions set.
July 2015, kubernetes v1.0 released.
kubernetes goal is to deploy container applications simple and efficient.
Official Website: https://kubernetes.io/

The main function of Kubernetes

Volume data
sharing of data between the container Pod, the data volume may be used.
Application health checks
in the container service may not process the request process to block, you can set the monitor to check the policy to ensure application robustness.
Copy the application instance
controller maintains the number of copies pod, a pod or pod guarantee of a number of similar groups are always available.
Elastically stretchable
automatically scaled according to the number of copies pod set of indicators (CPU utilization).
Service discovery
using environment variables or DNS service plug-in program to ensure that the container was found pod entry access address.
Load balancing
a group of pod assign a private copy of the cluster ip address and forwards the request to the back-end load balancing container. In a cluster of other pod can access the application via the clusterIP.
Rollover
update service is not interrupted, update a pod, rather than delete the entire service.
Service orchestration
deployment services through the file description, making application deployment becomes more efficient.
Resource Monitoring
Node node Component Integration cAdvisor resource collection tool that can be aggregated across the cluster nodes resource data through Heapster, and then stored in the database InfluxDB timing, again demonstrated by the Grafana.
To provide authentication and authorization
support role-based access control (RBAC) such as authentication and authorization policies.

The basic concept of objects

The basic objects

Pod
Pod deployment unit is the smallest, a Pod or more containers have a composition, the container Pod and shared storage network, Docker running on the same host.
Service
Service application service abstraction, defines a logical collection of Pod Pod and access policies in this collection.
Service Agent Pod is a set of external performance access entry, assign a cluster IP address requests from this IP load balancing forwarding container rear end in the Pod.
Service by selecting a set of Pod Lable Selector to provide services.
Volume
data volume, data sharing Pod the container used.
Namespace
namespace will be assigned to a different Namespace logic on the object, it may be different projects, such as the user to distinguish between management and set control strategies in order to achieve multi-tenancy.
Namespace also known as virtual cluster.
Lable
label for distinguishing objects (e.g. Pod, Service), the presence of key-value pairs, each object can have several labels, the label through an association object.

Based on the basic target a higher level of abstraction

ReplicaSet
next Replication Controller. Pod ensure that any number of copies of a given time specified and provide a formal statement updates and other functions.
The only difference between RC and RS is different lable selector support, RS-based support for a new set of tags, RC supports only equation-based label.
Deployment
Deployment is a higher-level API objects, which manages ReplicaSets and Pod, and provides a declarative update functions.
The official recommended Deployment management ReplicaSets, rather than directly using ReplicaSets, which means that may never need to directly manipulate objects ReplicaSet.
StatefulSet
StatefulSet for the persistence of the application, there is a unique network identifier (IP), persistent storage, orderly deployment, extend, delete and rollover.
DaemonSet
DaemonSet ensure that all (or some) nodes run the same Pod. When a cluster node joins Kubernetes, Pod scheduled to be running on the node, when the node is removed from the cluster, DaemonSet the Pod is deleted. Delete DaemonSet will clean it all Pod created.
Job
one-time task, after the run is completed Pod destruction, not re-start a new vessel, the task can also be run regularly.

System architecture and components function

master Components

kube-apiserver
unified entrance kube-apiserver API, clusters, each component coordinator, HTTP API provides an interface to services, resources additions and deletions to all objects of investigation and monitoring operations to APIService process for submission to the Etcd storage.
kuber-controller-manager
processing cluster in routine background task, a resource corresponding to a controller, and controllerManager is responsible for the management of these controllers.
kuber-scheduler
according to the scheduling algorithm selects a Node Pod newly created node.

Node Components

kubelet
kubelet is master Agent in the node Node, lifecycle management Run container, such as creating a container, Pod mount data volume, downloads Secret, node status, and obtaining container work. Pod kubelet converting each into a group of containers.
kube-proxy
implemented Pod Network Agent node Node, regulation and maintenance of the network load balancing four work.
docker or rocket / rkt
run containers.

Third Party Services

etcd
distributed key-value storage system. For maintaining the cluster state, such as object information Pod, Service and the like.

Guess you like

Origin www.cnblogs.com/yinshoucheng-golden/p/11108792.html
Recommended