Pod creation process in Kubernetes

Source: Internet
Author: User
Tags etcd

Pod is the most basic deployment dispatch unit in Kubernetes, and it can contain container, which logically represents an instance of a certain application. For example, a Web site application is built from the front end, back end, and database, and these three components will run in their respective containers, so we can create a pod containing three container. This paper will do a simple analysis of the basic processing flow of kubernetes.

The pod creation process is shown in the following illustration (the image comes from the network):



Specific steps to create include:

1, the client submits the creation request, may through the API server's RESTful API, may also use Kubectl command-line tool. Supported data types include JSON and YAML.

2, API server processing user requests, storage pod data to ETCD.

3, the scheduler through the API server to view the unbound pod. Try to assign a host to the pod.

4, filter host (scheduling preselection): Dispatcher with a set of rules to filter out the requirements of the host. For example, when the pod specifies the amount of resources required, the host that has less resources than the pod needs will be filtered out.

5, host scoring (scheduling optimization): The first step to screen the requirements of the host to mark, in the host scoring phase, the scheduler will consider some of the overall optimization strategy, such as the capacity of a replication controller copies distributed to different hosts, using the lowest load of the host.

6, select the host: Select the highest scoring host, carry out binding operations, the results are stored in the ETCD.

7, Kubelet According to the scheduling results of the pod creation operation: After the binding is successful, scheduler invokes the Apiserver API to create a Boundpod object in Etcd that describes all the pod information that is bound to run on a work node. Kubelet, which runs on each work node, also periodically synchronizes boundpod information with ETCD, and once the Boundpod object that should be running on the work node is found not updated, the Docker API is invoked to create and launch the container inside the pod.


Reference Links:

Kubernetes scheduling detailed "cloud software platform development engineer Zhang Wei"

http://ju.outofmemory.cn/entry/253027


Pod creation process in Kubernetes

Http://f.dataguru.cn/thread-685212-1-1.html



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.