当前位置:网站首页>One article tells you what kubernetes is
One article tells you what kubernetes is
2022-06-28 03:53:00 【Digital China cloud base】
Ask me what is Kubernetes ? You might as well go from Kubernetes The name speaks of .
Start with the name
Kubernetes The word comes from Greek , signify “ helmsman ”、“ The pilot ”. from Kubernetes Blue rudder logo Look at , What it takes is “ helmsman ” One mind .

Kubernetes Blue logo
The reason for taking “ helmsman ” One mind , It is because it borrows a figurative metaphor of the container ——“ Container ”. We vividly compare containers to shipping containers . The container enables each application to be installed and deployed in different environments without difference , For example, containers enable different goods to be transported uniformly in different ports .Kubernetes Borrowed “ Container ” This metaphor , Meaning hope to be the helmsman on the ship , Deliver containers safely and smoothly to all terminals , Transport management of numerous containers , That is to manage a large number of containers .

Steering the management container Kubernetes
The above is right Kubernetes An image understanding of , Let's take a look at Kubernetes Formal definition of .
Formal definition
Kubernetes The official website gives the definition :
Kubernetes It's a portable 、 Scalable open source platform , For managing containerized workloads and services , Promotes declarative configuration and Automation . Kubernetes With a huge and rapidly growing ecosystem .Kubernetes Service for 、 Support and tools are widely available .
Kubernetes Is an open source container choreography tool , Originally developed by Google . Its basic function is to manage containers , The container can be Docker Containers , It can also be containers from other technologies . This further means Kubernetes Can help manage applications made up of hundreds or thousands of containers .Kubernetes You can manage these containers in different environments , Such as physical machine environment , Virtual machine environment , Or cloud environment , Even mixed environments .
Simply speaking ,Kubernetes Is a tool for container orchestration , So what is the concept of container choreography ? Let's first understand the background of container choreography , This is just like Kubernetes The reason why such container choreography tools come into being .
The background of container choreography
Due to the increasing complexity of applications , And all sorts of other reasons , Microservice architecture is emerging . The rise of microservices has also greatly increased the use of containers , This is because the microservice framework splits and decouples a large single application to form many small independent microservice applications , The container is the best way to load and deploy these small micro services .

The rise of microservices has promoted the development of containers
The rise of microservices and containers further makes some applications composed of hundreds or even thousands of containers , At this time, the management of many containers has become a huge challenge . Managing these containers across multiple environments using scripts and homegrown tools is very complex , Sometimes it is even impossible for some scenes , This eventually led to the need for container choreography techniques .

Management challenges for large-scale containers
So how does container choreography manage these numerous containers ? This is the same question Kubernetes What kind of function does it have ? Here are a few simple concrete examples to illustrate .
How container choreography manages containers
Intelligent deployment
- Specify the deployment area
When we deploy applications , You can tell Kubernetes Our deployment requirements , Specify the deployment area we want . For example, in the following example , We want to deploy the application to the region A ,Kubernetes Observe the size specification of the container to be deployed , For example, what the container needs CPU 、 Memory size, etc , Then according to our needs in the region A Looking for a host that meets our needs , And create an instance of the container . Besides Kubernetes Very intelligent , It will be in the area A Select relatively idle 、 Hosts with relatively low resource utilization . In our case , host B Compared with the host A More free , therefore Kubernetes Priority will be given to the host B Create our container application instance on .

Deployed in the region A Relatively idle hosts in B
- Specify deployment resources
We can also ask Kubernetes Specify the specific resources required by the application , For example, deploy a machine learning application , The application needs to run on the GPU Training the model on the machine . We can approach Kubernetes Specify this deployment requirement , next Kubernetes According to our needs, we will look for products with GPU The host , Deployment of applications .

Deployed in GPU Region B
- Specify the deployment copy
Kubernetes It can help us easily deploy copies of multiple application instances . For example, tell Kubernetes We need two copies of the app ,Kubernetes An application instance will be deployed on two different hosts by default , To prevent single point failure , Improve application availability . After the application runs , Tell me again Kubernetes We need three copies of the application ,Kubernetes Will find the right host , Create another copy .

Create multiple copies
Load balancing
Kubernetes It will automatically detect the load of the container , If the container load is found to be too high , such as CPU Utilization is too high 、 Or the response time is too long ,Kubernetes A copy of the container is automatically created , Deploy and expand capacity . Take the following example , host D The upper container load is too high ,Kubernetes Automatically create a copy of the container , Distribute the load to multiple containers to achieve load balancing , Improve application response time .

Automatically create replicas for load balancing
Automatic recovery
Kubernetes It has the function of health check , If a container application unfortunately exits unexpectedly due to a failure ,Kubernetes This state will be detected , Then it will automatically migrate the containers that have failed , That is, restart a new container instance in a new place , Corresponding storage resources 、 The load balancing distribution rule will be associated to the new container instance , To complete an automatic recovery of the container .

The failed node automatically recovers
These are the basic contents of container arrangement , It's also Kubernetes Several basic functions of . Of course Kubernetes There are more powerful features , Such as error recovery 、 Log aggregation 、 Monitoring warning 、 Data persistence 、 Service discovery 、 Resource management 、 Configuration Management 、 The secret key management 、 Traffic forwarding, etc .

Kubernetes Some features and functions given on the official website
Except for the angle of container arrangement , We can also continue to understand from different angles Kubernetes.
From different perspectives Kubernetes

From all perspectives kubernetes
Operation and maintenance :Kubernetes It is a resource docking platform . We can put the host of the data center , Storage and network resources are handed over to Kubernetes, Give Way Kubernetes Automatically allocate these resources to applications that need them , Reduce manual operation , Improve operation and maintenance efficiency .
Development perspective :Kubernetes It is a distributed system management platform .Kubernetes It can help us deploy applications to hundreds of hosts , For application deployment 、 Operation and management support , Make the operation and deployment of distributed systems easier .
Project perspective :Kubernetes It's an open source project , It does not belong to any commercial company , It is the cloud native Computing Foundation CNCF Its core open source projects .
Development perspective :Kubernetes Like an operating system in the cloud age .Linux、Windows The operating system helps us manage the computing of a single host 、 Storage and network resources , and Kubernetes Managed the computing of hundreds of hosts for us 、 Storage and network resources , And through the arrangement and management of containers , Realize the effective utilization of resources .Kubernetes It's like a distributed operating system , The container instance running on it is equivalent to the process in the distributed operating system .
Kubernetes Not the only container orchestration management tool , stay 2014 year Docker The company took the lead in releasing the container layout tool Docker Swarm, Then there was a battle for container choreography .

The battle of container choreography
Containers The battle of choreography
In order to fight with Docker The container business ecosystem with the company as the core , stay Kubernetes After the release ,Google、Red Hat And other open source infrastructure companies CNCF The foundation , I hope to Kubernetes Based on , Build a vendor led open source infrastructure 、 A platform community operated by an independent foundation .
Final Kubernetes With the following advantages, we finally won the victory :
- The accumulation is rich
Kubernetes Derived from Google The long-standing large-scale cluster management system Borg.Kubernetes Standing on the shoulders of giants , With the help of Borg The system has more than ten years of practical experience and technical precipitation , Will succeed Google All applications run over 100 10000 servers 、 exceed 80 Data centers , Weekly 20 Billion containers .
- Flexible design
Compared with simple function 、 Ecologically self closing Swarm project ,Kubernetes With its powerful functions, it is far behind . adopt Kubernetes, Users can choose according to their own usage scenarios 、 Through flexible plugging , Adopt custom network 、 Storage 、 Dispatch 、 monitor 、 Log and other modules .
- Open source
Kubernetes Enter the public's view as open source for the first time , user 、 Communities and major enterprises have embraced Kubernetes, Start supporting... On your own products Kubernetes. In user 、 With the support of the community and big factories , Kubernetes It has gradually become the deployment standard of enterprise infrastructure and a new generation of application service layer .
Docker The company in Kubernetes After the rise and expansion of the community , Finally, I was defeated ,Kubernetes It has become the mainstream container choreography tool , Then, there are many problems based on Kubernetes Business Edition services and products .
Kubernetes Open source projects and commercial products
Kubernetes It's an open source project , It is the core open source project under the cloud native Computing Foundation , Therefore, it does not belong to any software manufacturer , Anyone and organization can get it for free Kubernetes Source code and binary files , However, the open source community does not provide product support for business users , In order to meet the needs of enterprise users , Many vendors are based on open source Kubernetes Open source projects for , Provides a commercial version of Kubernetes Services and products , For example, in the private cloud, there are Red Hat OpenShift, Major cloud manufacturers also provide Kubernetes Service for , Such as Azure Upper AKS 、GCP Upper GKE etc.

Open source projects to commercial software
Kubernetes It's the cloud age “ operating system ”, It provides an important foundation for the implementation of hybrid cloud and multi cloud architectures , It is playing an important role in the development of cloud primordial .
边栏推荐
- 用Pycharm开发Flask框架设置debug模式没有效果的解决办法
- 【毕业季】研究生の毕业总结
- Li Kou daily question - day 29 -575 Divide candy
- Paging query optimization in MySQL of database Series
- MySQL 数据库的自动备份操作
- What is the core problem to be solved in the East and West?
- 多线程与高并发五:等待队列及Executor和线程池详解(重点)
- 力扣每日一题-第29天-1491.去掉最低工资和最高工资后的平均工资
- 数组的方法
- Resource management, high availability and automation (Part 2)
猜你喜欢

Resource management, high availability and automation (Part 2)

WPF 下的自定义控件以及 Grid 中控件的自适应

Analysis of slow logs in MySQL and tidb of database Series

A preliminary study of blackbody radiation

资源管理、高可用与自动化(下)

工业物联网将取代人工发展吗?

数据库系列之InnoDB中在线DDL实现机制

Execution plan in MySQL of database Series

English语法_形容词/副词3级-比较级_常用短语

一文告诉你什么是 Kubernetes
随机推荐
English语法_形容词/副词3级-比较级_常用短语
数据库
INFO:  HHH000397:  Using…
《Go题库·12》slice和array区别?
TypeScript 联合类型
多线程与高并发四:VarHandle与强软弱虚引用和ThreadLocal
继承
如何修改SE38编辑器主题
Lamaba表达式学习及常用函数式接口
Huawei equipment WLAN basic service configuration command
STM32外设SDIO和SD卡的配置
Cannot edit in read-only editor if it appears in vscode
A solution to the inefficiency of setting debug mode in developing flask framework with pychar
Chapter IX app project test (3) test tools
How the uni app automatically switches the requested address according to the environment
工业物联网将取代人工发展吗?
MySQL configuration of database Series F5 load balancing
Go speed
局域网内共享打印机的几种方式
力扣每日一题-第29天-1491.去掉最低工资和最高工资后的平均工资