April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Kubernetes

What is Kubernetes?
Kubernetes is a Google open source container cluster management system, based on Docker build containers, the use of Kubernetes can manage a number of Docker host in the container.
The main functions are as follows:
1) abstracts multiple Docker hosts into one resource to manage containers in a clustered manner, including task scheduling, resource management, resilient scaling, rolling upgrades, and more.
2) Use the layout system (YAML File) to quickly build container clusters, provide load balancing, solve container direct correlation and communication problems
3) automatically manage and repair the container, simply say, such as creating a cluster, there are ten containers, if a container is closed, then, will try to restart or re-allocation of containers, always ensure that there will be ten containers in operation, Kill the excess.

What is Kubernetes?
Kubernetes is a Google open source container cluster management system, based on Docker build containers, the use of Kubernetes can manage a number of Docker host in the container.
The main functions are as follows:
1) abstracts multiple Docker hosts into one resource to manage containers in a clustered manner, including task scheduling, resource management, resilient scaling, rolling upgrades, and more.
2) Use the layout system (YAML File) to quickly build container clusters, provide load balancing, solve container direct correlation and communication problems
3) automatically manage and repair the container, simply say, such as creating a cluster, there are ten containers, if a container is closed, then, will try to restart or re-allocation of containers, always ensure that there will be ten containers in operation, Kill the excess.
Kubernetes role composition:
1) Pod
Pod is the smallest unit of kubernetes, a pod can be composed of one or more containers;
The same Pod can only run on the same host, share the same volumes, network, namespace;
2) ReplicationController (RC)
RC is used to manage the pod. An RC can consist of one or more pods. After the RC is created, the system creates the number of pods based on the number of copies defined. In the course of running, if the number of Pod is less than defined, it will restart the stop or reassign Pod, otherwise kill the excess. Of course, you can also dynamically stretch the size of the Pods or familiar.
RC is associated with the corresponding Pods through the label, and in the rolling upgrade, the RC uses a Pod that replaces the entire Pods to be updated.
3) Service
Service defines the abstract resources of a Pod logical set, and the containers in the Pod collection provide the same functionality. The collection is created according to the defined Label and selector. When a Service is created, a Cluster IP is assigned. This IP provides a unified access interface with the defined port and implements load balancing.
4) Label
Label is used to distinguish between Pod, Service, RC key / value key pairs;
Pod, Service, RC can have multiple labels, but each label’s key can only correspond to one;
Mainly to the Service request through the lable forwarding to the backend to provide services Pod collection;
Kubernetes components:
1) kubectl
The client command line tool formats the accepted command and sends it to the kube-apiserver as the operating entry for the entire system.
2) kube-apiserver
As a control entry for the entire system, the REST API service provides an interface.
3) kube-controller-manager
Used to perform the background tasks in the entire system, including node status, Pod number, Pods and Service associations.
4) kube-scheduler
Responsible for node resource management, accepting pods tasks from kube-apiserver, and assigning them to a node.
5) etcd
Responsible for service discovery and configuration sharing between nodes.
6) kube-proxy
Run on each compute node, responsible for Pod network proxy. Timing from the etcd to obtain the service information to do the appropriate strategy.
7) kubelet
Run on each compute node, as an agent, accept the Pods task assigned to the node and manage the container, periodically get the container status, and feed it back to kube-apiserver.
8) DNS
An optional DNS service for creating DNS records for each Service object so that all Pods can access the service through DNS.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>