Read k8s source also has a short period of time, from the beginning of a face to now almost familiar, but also is a little sentiment, record, hope to see this blog students a little help. "Kubernetes authoritative guide" This book content is quite good, before reading the source can quickly filter the corresponding chapters, familiar with the source of the infrastructure and key concepts. But one flaw in this book is that there is no clear diagram or introduction of what's to be said about critical code analysis, so you might actually need to read a little bit of the source to understand what's going on in the book. Also, Kubernetes is currently in the process of a rapid iteration, the content of the book's explanation has been behind several versions. K8s source code is not stingy with the use of Go routine. A go routine only completes one thing and uses channel interaction between the go routine. When reading the source code, it is helpful to use the mind map to record the call relationship of the function, for the following reasons, the effect is as follows:
It's better to read the source code in a purposeful way. K8s There is a lot of processing logic in the code for scalability, API compatibility, and so on. If it is for a specific problem, directly to find the corresponding source code, it should also be able to have a high efficiency. Please open the code line , k8s some places in a line of code to hide the launch of a number of go routine, if the editor for the reason did not notice the Hide run (), then there are some things really are not found:). K8s used a lot of third-party open source libraries, be careful not to sink in. refer to how I read the Kubernetes source code. : This problem-solving source reading is the most recommended, you can refer to the Kubernetes source Analysis –kubelet components: Use the mind map reading source is to the blogger learning k8s source Analysis--kube-apiserver Analysis (1): Write very slag, Do not know Bo main analysis source is what to do