Introduction to Kubernetes Architecture

Source: Internet
Author: User
Tags etcd

Kubernetes is a master-slave structure, it mainly implements the Docker of the dispatch, the following detailed introduction of my understanding of the Kubernetes architecture:

Master node :


API Server: Provides the API interface of cluster management, it becomes the central hub of data interaction and communication between each function module in the cluster, and has the complete cluster security mechanism, is the core of the whole cluster.

Scheduler: Mainly responsible for the pod scheduling strategy, the main role is to the scheduling of the pod according to a specific scheduling algorithm and scheduling strategy to bind to a suitable node in the cluster, and binding information to write in ETCD. He also gets the YAML that creates the pod by listening to API server.

Controller Manager: is the cluster internal Management control center, the main provision of control services are: Replication Controller (pod copy control), Node Controller (Control of Node nodes), Resourcequota Controller (Control of resources), ServiceController and endpoint Controller (service generation and control), its control management process is through the listening API Server to implement the.

ETCD: A data Warehouse that is used to store all kinds of information and additions and deletions, all of which will be stored here.

Node nodes :


pod: is the smallest unit of operation, inside can run 1~ multiple container, each pod will have a unique IP address. Resources are isolated according to the namespace.

kubelet: Each node will have a Kubelet service process that handles the tasks assigned to this node by the master node, manages and creates pod containers, and periodically reports the usage of node resources to API server.

kubelet-proxy: The real agent of the service, the service to receive services, the use of Iptables to redirect service requests to Kubelet-proxy, and then distribute the task to the corresponding pod node. (The Roundrobin algorithm selects members individually according to the list of members, and if a round loop completes, the next round starts from scratch, while supporting the session)

Here are two small examples to describe the functions of each function node in detail:

pod creation process (pictured):


1. Instructions to APISERVER,API server to solidify pod creation information on ETCD

2. Scheduler monitors the Apiserver's watch port to see that there is a message to create pod in ETCD, select the appropriate node node for the pod and bind it, after the binding is successful, Scheduler invokes the Apiserver API's addition interface to create a Boundpod object in Etcd that describes all pod information that is bound to run on a work node.

3. Kubelet monitors Apiserver's watch port to monitor pod information and discovers new pod bindings on the node, then pod creation is based on boundpod information in ETCD.

4. Docker will view the Docker information from the image warehouse and download Docker image to container the final creation.

5. Controller-manager will monitor the port of the API server to manage node, pod replicas, resources, and so on.


external access to pod,pod and service delivery :


1 Controller-manager monitors the port of the API server and then manages the creation of the service and endpoint, where endpoint primarily provides access to the server's copy of the pod.

2 Proxy is the main provider of service, he discovers the service by listening to the port of API server, creates an agent interface for service. The socket server is used to receive access requests from the server and create Iptables, Use its rules to redirect the service request to the socket server.

3 Upon receipt of the service request, proxy forwards the request to the back-end pod, implementing the request and achieving load balancing.
All of these are personal views, if there are errors, I would also ask you to correct me

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.