Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the concept and function of Kubernetes

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "what is the concept and function of Kubernetes". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

It's time to learn Kubernetes, or you won't dare to say you know containers and Docker.

1. The previous life of Kubernetes

Kubernetes, which is a new distributed architecture scheme based on container technology, has been widely used in the container field in recent years, as a typical scheme of containerized deployment.

It looks new (compared to when it first appeared), but it is an important result of Google's experience in large-scale application of container technology over the past decade. To be exact, Kubernetes is an open source version of Borg, Google's secret weapon for more than a decade. Borg is a well-known large-scale cluster management system for internal use by Google. It is based on container technology and aims to automate resource management and maximize resource utilization across data centers. Google has been managing a huge cluster of applications through Borg for more than a decade, and because Google employees have signed confidentiality agreements and cannot disclose Borg's internal design even if they leave, it has been impossible to know more about it. It wasn't until April 2015, when the long-rumored Borg paper was released, and with the high-profile publicity of Kubernetes being made public by Google for the first time, that people were able to learn more about it. Officially, by standing on the shoulders of Borg's predecessors and learning from the experiences and lessons of Borg over the past decade, Kubernetes became a blockbuster as soon as it was open source and quickly dominated the container field.

Borg is a jet driving system, very professional and high-end, it is suitable for a big company like Google, it has millions of machines. Kubernetes is a simplified version of it, it is a well-designed car, it is suitable for small and medium-sized companies, it is more convenient to use it to dispatch their own clusters.

2. What is Kubernetes?

Kubernetes is an open source system for automatically deploying, extending, and managing containerized applications. It combines the containers that make up the application into logical units for easy management and service discovery. Kubernetes comes from 15 years of operation and maintenance experience in Google's production environment and brings together the best ideas and practices of the community.

Kubernetes, built on Docker technology, provides a complete set of functions such as resource scheduling, service discovery, highly available management and auto scaling for cross-host containerized applications. It provides comprehensive management tools covering development, deployment testing, operation and maintenance monitoring and other aspects. Its goal is not only an orchestration system, but also to provide a specification that allows you to describe the architecture of the cluster and define the final state of the service. Kubernetes can help you automatically reach and maintain the system in this state.

2.1 highlight

Highlight 1: Kubernetes is an innovative product with the guiding ideology of "everything takes Service as the center, everything revolves around service". It always follows this guiding ideology in functional and architectural design. Systems built on Kubernetes can not only run independently on physical machines, virtual machine clusters or enterprise private clouds, but also be hosted on public clouds.

Highlight 2: Kubernetes is an open development platform. Unlike J2EE, it is not limited to any language and does not define any programming interface, so programs written in Java, Go, C++ or Python can be mapped to the Service of Kubernetes and interact through the standard TCP communication protocol. In addition, the Kubernetes platform does not have any intrusiveness to the existing programming language, programming framework and middleware, and achieves zero intrusion, so the existing system is also easy to upgrade and migrate to the Kubernetes platform.

Highlight 3: another highlight of Kubernetes is automation. In Kubernetes's solution, one can be self-expanding, self-diagnosing, and easy to upgrade. After receiving a request for service expansion, Kubernetes will trigger the scheduling process, and finally start the service instance replicas of the corresponding data on the selected target node. These service instance replicas will be automatically added to the load balancer and take effect after starting successfully, and no additional manual operation is required in the whole process. In addition, Kubernetes regularly checks the availability of all instances of each service to ensure that the number of service instances is always the expected number. When it finds that an instance is not available, it automatically restarts the instance or reschedules and runs a new instance on other nodes. This complex process can be completed automatically without human intervention.

Highlight 4: Kubernetes is a complete supporting platform for distributed systems. It has complete cluster management capabilities, including multi-level security protection and access mechanism, multi-tenant application support capability, transparent service registration and service discovery mechanism, built-in intelligent load balancer, strong fault discovery and self-repair capabilities, service rolling upgrade and online expansion capabilities, scalable automatic resource scheduling mechanism, and multi-granularity resource quota management capabilities. At the same time, Kubernetes provides comprehensive management tools, which cover all aspects, including development, deployment testing, operation and maintenance monitoring. Therefore, Kubernetes is a brand-new distributed architecture solution based on container technology, and it is an one-stop complete distributed system development and supporting platform.

With the limitations of containerized deployment environment, language differences, the large number of containers, load balancing, fault detection, fault repair and other problems, if you put too much energy and time into these places, how much work will be? it will make many enterprises and products stop for containers. In the containerization era, Kubernetes is enough to avoid the above problems and make containerization easier and easier to use, and it only takes more time to complete the development of business functions.

2.2 characteristics

Kubernetes features are as follows:

Service topology: service traffic routing based on cluster topology. You can have a service route traffic based on the clustered Node topology. For example, a service can specify that traffic is routed first to an endpoint in the same Node or in the same availability zone as the client.

Endpoint slices: scalable tracking of network endpoints in a Kubernetes cluster.

Storage orchestration: automatically mounts selected storage systems, including local storage, storage provided by public cloud providers such as GCP or AWS, or network storage systems such as NFS, iSCSI, Gluster, Ceph, Cinder, or Flocker.

Secret and configuration management: deploy and update the configuration of Secrets and applications without having to rebuild the container image and without exposing secret information in the software stack configuration.

Batch execution: in addition to services, Kubernetes can also manage your batch and CI workloads, replacing failed containers when desired.

Service discovery and load balancing: unfamiliar service discovery mechanisms can be used without modifying your application. Kubernetes provides the container with its own IP address and a DNS name, and can achieve load balancing between them.

Self-repair: restart failed containers, replace and reschedule containers when the node dies, kill containers that do not respond to user-defined health checks, and do not expose them to the client until they are ready for service.

Automated rollback and rollback: Kubernetes brings changes to the application or its configuration online step by step, while monitoring the application's health to make sure you don't terminate all instances at the same time. If there is a problem, Kubernetes will roll back the changes for you. You should take full advantage of the growing ecosystem of deployment solutions.

Auto-boxing: automatically place containers based on resource requirements and other constraints without affecting availability. Mix critical and best-effort service workloads to improve resource utilization and save more resources.

IPv4/IPv6 dual stack: assigns IPv4 and IPv6 addresses to Pod and Service.

Scale horizontally: use a simple command, a UI, or automatically scale an application based on CPU usage.

3. Why use Kubernetes?

There are many reasons to use Kubernetes, the most important of which is that the IT industry has always been driven by new technologies.

At present, Docker containerization technology has been adopted by many companies, from stand-alone to cluster has become inevitable. The vigorous development of cloud computing is accelerating this process. Kubernetes, as a large-scale containerized distributed system solution based on Docker, which is widely recognized and favored by the industry, has been vigorously promoted and maintained by IT giants led by Google.

In 2015, Google teamed up with more than 20 companies to establish CNCF (Cloud Native Computing Foundation, Cloud Native Computing Foundation) open source organization to promote Kubernetes, thus ushering in a new era of cloud native applications (Cloud Native Application). As the official cloud native platform of CNCF, Kubernetes is subverting the way applications are developed.

You might as well take a look at it from the following aspects, you will certainly like it!

3.1 one platform to handle all

Deploying any application using Kubernetes is a piece of cake. As long as the application can be packaged into an image and deployed in a container, Kubernetes is sure to launch it.

No matter what language or framework the application is written (such as Java, Python, Node.js), Kubernetes can launch it safely in any environment, such as physical server, virtual machine, cloud environment.

3.2 seamless migration of cloud environment

If you have the need to change the cloud environment, for example, from GCP to AWS, using Kubernetes, you don't have to worry about anything.

Kubernetes is fully compatible with a variety of cloud service providers, such as Google Cloud, Amazon, Microsoft Azure, and can also work in CloudStack, OpenStack, OVirt, Photon, VSphere, etc.

3.3 efficient use of resources

Looking at the figure below, there are four virtual machines on the left, the yellow and blue parts are running applications, and the white ones are unused memory and processor resources.

On the right, the same application is packaged and run in the container.

If Kubernetes finds that some nodes are not saturated, it will reallocate pod, which helps us to save money and make efficient use of memory, processors and other resources.

If one node goes down, Kubernetes automatically recreates the pod that was running on that node and runs on other nodes.

3.4 automatic scaling out of the box

Network, load balancing, replication and other features are all available out of the box for Kubernetes.

Pod is stateless, and any time a pod goes down, there will be another pod to take over its job, which users won't feel at all.

If the number of users suddenly explodes and the existing pod is not large enough, a new batch of pod will be automatically created to meet the current needs.

And vice versa, when the load falls, Kubernetes automatically reduces the number of pod.

3.5 makes CI/CD easier

You don't have to be proficient in tools like Chef and Ansible, just write a simple script to the CI service and run it, and you will use your code to create a new pod and deploy it to the Kubernetes cluster.

The application is packaged in a container so that it can be safely run anywhere, such as your PC, a cloud server, making testing extremely easy.

3.5 Reliability

An important reason why Kubernetes is so popular is that applications will always run smoothly and will not be interrupted by pod or node failures.

In the event of a failure, Kubernetes creates the necessary number of application images and distributes them to a healthy pod or node until the system is restored.

And users will not feel any discomfort.

A containerized infrastructure is self-healing and can provide uninterrupted operation of applications, even if part of the infrastructure fails.

4. Summary

Kubernetes makes it easy and secure to start, migrate and deploy applications.

You don't have to worry about the problems with the work after the application migration, and you don't have to worry that a server can't cope with the sudden number of users.

It is important to note that your application is best developed using a micro-service architecture, because micro-service applications are more suitable for containerization than single applications.

Do not introduce simply to use Kubernetes, to see whether the size of your system is worth using, otherwise it may be counterproductive, after all, Kubernetes learning requires a certain cost.

Reference article:

Http://www.mamicode.com/info-detail-1436432.html

Https://yellow.systems/blog/why-you-should-use-kubernetes-in-your-next-project

This is the end of the content of "what is the concept and function of Kubernetes". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report