"Original" k8s source analysis----Apiserver apigroupversion

Source: Internet
Author: User
Tags k8s

"original" k8s source analysis----Apiserver apigroupversion

Reproduced in this article from my own space: http://user.qzone.qq.com/29185807/blog/1458892866

the previous 3 articles, mainly based on the program processing process to jump analysis. Through the jump analysis of these processes, the dark clouds are finally seen.

We peel off the unimportant parts and go directly to the main frame.

apigroupversion

In master, the initialization of the API V1

A default apigroupversion is generated.

Below is the most important data structure in the entire framework.

I. Main data structure

1, Mapper, the most important thing is the inside of the Restmapping function (in K8s.io\kubernetes\pkg\api\meta )


2, Codec, is mainly a coding, decoding the interface (in K8s.io\kubernetes\pkg\runtime )


3, Typer (in K8s.io\kubernetes\pkg\runtime )


4, creater (in K8s.io\kubernetes\pkg\runtime )


5, Convertor, conversion between different versions (in K8s.io\kubernetes\pkg\runtime )


6, Linker (in K8s.io\kubernetes\pkg\runtime )


7, the remaining temporarily do not do analysis

Second, the main work flow

K8s.io\kubernetes\pkg\apiserver \ Apiserver.go

Main process

According to the main process, the decomposition steps

1. Initialize Installer


2. New WebService


3. Start Registration




Insert a mapping structure


Plug in a Restscope interface

We continue to



Continue to skip some of the code


To this all process.

We'll trace it back in. Get processing process






From this process plus the previous 3 articles, the main processing process has been more clear. Then the rest is mapper,codec,typer,creater,convertor,linker and so on the implementation of these interfaces analysis.

Hao Haohua

QQ Crescent 29185807

March 25, 2016

"Original" k8s source analysis----Apiserver apigroupversion

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.