current position:Home>The enmity between docker and k8s (VIII) -- suddenly looking back on kubernetes
The enmity between docker and k8s (VIII) -- suddenly looking back on kubernetes
2022-01-27 04:21:23 【Grape City technical team】
In the system, it introduces how to actually deploy a K8S After the project , As the last article in this series , Let's see Kubernetes Cluster content overview , Then summarize some deeper functions .
Kubernetes The overview
Here is a k8s Overview structure and content of
You can see that among the functional modules mentioned in the figure , There are others that do not appear in this article :
l ConfigMap
Used to store user profile definitions , Through its internal Volume Projection technology implementation , Actually, too. Volume A way to mount . This method can not only realize the reuse of applications , Moreover, more flexible functions can be realized through different configurations . When creating a container , Users can package the application as a container image , Configuration injection is performed through environment variables or external mount files .
l Secret
Secret Object types are used to hold sensitive information , For example, password 、OAuth Token and SSH secret key . Put this information in Secret Put the middle ratio in Pod The definition of 、 In the container image 、 be relative to ConfigMap Say safer and more flexible . Secret It's standard k8s Resource objects , Usage and ConfigMap Very similar . At the same time, we can Secret Access control , Prevent confidential data from being accessed
l PV
PVC yes Kubernetes Implementation of persistent data volume in , It is StatefulSet Core functions , It's also Pod The necessary means of persistence ,Kubernetes adopt PV and PVC Split , So as to achieve the decoupling of function points .
In addition to what is mentioned in the text , Kubernetes The content of clusters is also much more complex than what we have seen so far , There is also a lot of content waiting for us to explore .
ad locum , Let's summarize these deep-seated functions , It's also a for in-depth learning Kubernetes The carding of .
Kubernetes Components
The server we usually use in the process of development ( Host machine ), stay Kubernetes The cluster is called Node node .
At the same time Kubernetes There is one or more Master The node controls multiple host computers to realize cluster , Whole Kubernetes The core scheduling functions of are basically Master Node .
Kubernetes Its main functions are composed of five major components :
- kubelet: Installed in the Node Node , To control Node The container in the node is complete Kubernetes The scheduling logic of
- ControllerManager: It is the core management component of the controller mode we mentioned above , Managed everything Kubernetes Controller logic in the cluster
- API Server: The service handles the... In the cluster api request , We've been writing kubectl, It's actually sent to API Server Request , Requests are processed and forwarded internally
- Scheduler: be responsible for Kubernetes Service scheduling , For example, the controller just controls Pod Arrangement of , The final scheduling logic is composed of Scheduler Completed and sent a request to kubelet Executive
- Etcd: This is a distributed database storage project , from CoreOS Development , Was eventually RedHat Acquisition becomes Kubernetes Part of , It contains Kubernetes All configuration information in the cluster , For example, all cluster objects name,IP,secret,configMap And so on , Relying on its own consistency algorithm, it can ensure the rapid and stable return of various configuration information in the system , So this is also Kubernetes And the core components in your heart
Customized functions
In addition to various powerful component functions ,Kubernetes It also provides users with a very high degree of freedom .
In order to achieve this high degree of freedom ,Kubernetes Three open interfaces are provided to users , Namely :
l CNI(Container Networking Interface, Container network interface ): It is defined. Kubernetes The link mode of all networks in the cluster , The network of the whole cluster is realized through this interface . As long as the network plug-in realizes all functions in this interface , Can be used as Kubernetes Network configuration plug-in for cluster , It includes the host routing table configuration 、7 Layer network discovery 、 Packet forwarding and so on have all kinds of small plug-ins , These small plug-ins can also be used together at will , Users can customize these functions freely according to their own needs
l CSI(Container Storage Interface, Container storage interface ) Defines some specifications for cluster persistence , As long as the storage function of this interface is implemented , Can be used as Kubernetes Persistence plug-ins l CRI(Container Runtime Interface, Container runtime interface ): stay Kubernetes When the container is running , For example, the default configuration Docker When the container of this cluster runs , Users are free to choose any other container project that implements this interface , Like I mentioned before containerd and rkt
Here's an interesting point :CRI.
Kubernetes The default container for is Docker, However, due to the competition in the early stage of the project ,Docker It's not enough Kubernetes Defined by the CRI standard , Then what shall I do? ?
To solve this problem ,Kubernetes Specially for Docker Wrote a program called DockerShim The components of , namely Docker shim , Used to handle CRI Request specification , Convert into Docker operation Linux Of OCI standard ( Yes , It's the one mentioned in the second part OCI The foundation's code ). But this function has always been by Kubernetes Project maintenance , as long as Docker New features have been released Kubernetes We have to maintain this DockerShim Components .
therefore , This recent news ——Kubernetes Will be in next year's version v1.20 Delete... From DockerShim Components , It means starting with the new version next year ,Kubernetes Will not fully support Docker Container update .
But in fact, this may not have any impact on our ordinary developers , The worst result is that our image needs to be from Docker Change to something else Kubernetes Supported container images .
However, according to the news released by various cloud platforms during this period , These platforms will provide corresponding conversion measures , For example, we still provide Docker Mirror image , The platform will convert these images into other images when publishing operation and maintenance ; Or these platforms will maintain a DockerShim To support Docker, There are solutions .
Architecture Overview and summary
In this part, let's take a look at Kubernetes The architecture of the figure :
Through this series of learning , As an ordinary programmer , Have to admire Google Have a deep and extreme understanding of coding , There are too many components in the framework just because of decoupling , And it also provides such a large degree of freedom , It has to be said that it is a framework with great technical depth encountered by our movable type development team in the process of learning .
But this high degree of freedom also has negative effects .
During deployment ,Kubernetes Cluster complexity is very high , Deploy a to meet the needs of the production environment Kubernetes The framework is even more difficult , There are also special sellers on the Internet Kubernetes Script program for cluster deployment in production environment , so Kubernetes The scale of the system .
In the process of learning, you can use kinD perhaps minikube In local with Docker In the form of a Kubernetes colony , However, there is still a certain gap between this level of learning and the production environment .
summary
This series of articles , It describes in detail several difficult gods encountered by our movable type lattice development team in the process of going to heaven .
From the development of cloud platform to k8s Specific use of , Step by step, I explained a cloud platform , From the original virtual machine , To PaaS embryonic form , To Docker Containerization , And finally Kubernetes The transition and evolution of the form of .
Human memory needs to rely on precursor nodes , Just through an article, I want to put Kubernetes It is obviously impossible to explain the technical points and various difficult to remember nouns one by one , Our idea is to let everyone understand the evolution process of the whole cloud ecology step by step , So as to finally understand the whole project .
Finally, I want to give you a word :
It's on paper , We must know that we must do it .
After our development team members read these documents for the first time, they feel that they have completely mastered , But in the actual document writing process , I found that my eyes were black , I don't know where to start .
Too many knowledge points only stay in heard of , Just know what stage it is . I suggest you start here , Try the examples mentioned in the article , We believe that after writing it ourselves , You will have a different understanding of these contents .
Although this series is over , However, in the follow-up content, we will continue to tell you more about various technical secrets encountered by new and old grapes in the grape city 、 Share .
I think the content is good. Give me a compliment before you go ~
Reprint please indicate the source : Grape city official website , Grape city provides professional development tools for developers 、 Solutions and services , Enabling developers .
copyright notice
author[Grape City technical team],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/01/202201270421196205.html
The sidebar is recommended
- Spring IOC container loading process
- [thinking] the difference between singleton mode and static method - object-oriented programming
- Hadoop environment setup (MySQL environment configuration)
- 10 minutes, using node JS creates a real-time early warning system for bad weather!
- Git tool
- Force deduction algorithm - 92 Reverse linked list II
- What is the sub problem of dynamic programming?
- C / C + +: static keyword summary
- Idea does not have the artifacts option when configuring Tomcat
- Anaconda can't open it
guess what you like
-
I don't know how to start this
-
Matlab simulation of transportation optimization algorithm based on PSO
-
MySQL slow log optimization
-
[Vue] as the window is stretched (larger, smaller, wider and higher), the text will not be displayed
-
Popular Linux distributions for embedded computing
-
Suzhou computer research
-
After installing SSL Certificate in Windows + tomcat, the domain name request is not successful. Please answer!!
-
Implementation time output and greetings of jQuery instance
-
The 72 year old uncle became popular. Wu Jing and Guo fan made his story into a film, which made countless dreamers blush
-
How to save computer research
Random recommended
- Springboot implements excel import and export, which is easy to use, and poi can be thrown away
- The final examination subjects of a class are mathematical programming, and the scores are sorted and output from high to low
- Two pronged approach, Tsinghua Professor Pro code JDK and hotspot source code notes, one-time learning to understand
- C + + recursive knapsack problem
- The use of GIT and GitHub and the latest git tutorial are easy to understand -- Video notes of crazy God speaking
- PostgreSQL statement query
- Ignition database test
- Context didn't understand why he got a high salary?, Nginxfair principle
- Bootstrap switch switch control user's guide, springcloud actual combat video
- A list that contains only strings. What other search methods can be used except sequential search
- [matlab path planning] multi ant colony algorithm grid map path planning [including GUI source code 650]
- [matlab path planning] improved genetic algorithm grid map path planning [including source code phase 525]
- Iinternet network path management system
- Appium settings app is not running after 5000ms
- Reactnative foundation - 07 (background image, status bar, statusbar)
- Reactnative foundation - 04 (custom rpx)
- If you want an embedded database (H2, hsql or Derby), please put it on the classpath
- When using stm32g070 Hal library, if you want to write to flash, you must perform an erase. If you don't let it, you can't write continuously.
- Linux checks where the software is installed and what files are installed
- SQL statement fuzzy query and time interval filtering
- 69. Sqrt (x) (c + + problem solving version with vs runnable source program)
- Fresh students are about to graduate. Do you choose Java development or big data?
- Java project: OA management system (java + SSM + bootstrap + MySQL + JSP)
- Titanic passenger survival prediction
- Vectorization of deep learning formula
- Configuration and use of private image warehouse of microservice architect docker
- Relearn JavaScript events
- For someone, delete return 1 and return 0
- How does Java dynamically obtain what type of data is passed? It is used to judge whether the data is the same, dynamic data type
- How does the database cow optimize SQL?
- [data structure] chain structure of binary tree (pre order traversal) (middle order traversal) (post order traversal) (sequence traversal)
- Webpack packaging optimization solution
- 5. Operation element
- Detailed explanation of red and black trees
- redhat7. 9 install database 19C
- Blue Bridge Cup notes: (the given elements are not repeated) complete arrangement (arrangement cannot be repeated, arrangement can be repeated)
- Detailed explanation of springboot default package scanning mechanism and @ componentscan specified scanning path
- How to solve the run-time exception of test times
- Detailed explanation of k8s management tool kubectl
- Android system view memory command