“What will be hot and what to learn in 2022? This article is participating in the” Talk about 2022 Technology Trends “essay campaign.

First throw out my conclusion, Kubernetes will definitely hit.

Just like N years ago, enterprises needed to build their own room to deploy servers. When Ali Cloud and other cloud manufacturers emerged, everyone began to “cloud”, which is convenient, fast and stable, and avoids the cost of operation and maintenance personnel.

And Kubernetes can further liberate productivity, improve the flexibility of project deployment, improve the application of disaster resilience, dynamic scaling and so on.

Introduction to the

Kubernetes(k8S for short) is Google open source container cluster management system, is a new container technology based on the distributed architecture of the leading solution, simply k8S is a container scheduling management platform.

Based on Docker technology, a series of complete functions such as deployment and operation, resource scheduling, service discovery and dynamic scaling are provided for containerized applications, which improves the convenience of large-scale container cluster management.

A picture is worth a foreword

Constitutive requirements

  • Kubernetes cluster consists of Master and Node nodes
  • Master components include ETCD, Api Server, Scheduler and Controller Manager, among which Api Server is the gateway of the whole cluster.
  • Node is mainly composed of Docker, Kubelet, Kubenetes Proxy and other components.

Function is introduced

Master

  • Is the master node of Kubernetes, the management node.
  • It is the gateway and hub of a cluster. It exposes apis, tracks the health of other servers, optimally schedules load, and orchestrates communication between other components.
  • A single Master node can perform all functions. However, multiple Master nodes are usually deployed in a production environment to form a Cluster because of the pain point of single point failure.

Node

  • Is the work node of Kubernetes.
  • Responsible for receiving work instructions from the Master and creating and destroying Pod objects accordingly.
  • Adjust network rules for proper routing and traffic forwarding.
  • Node There are multiple nodes.

function

The official line:

  • Rapidly deploy and scale applications
  • Seamlessly connect to new applications
  • Save resources and expand capacity dynamically

Do you think the functions of the official introduction are abstract? Here I introduce the functions of K8S based on my own project experience:

Automated on-line and rollback

The traditional way to go online is mostly through manual operation git: upload it to the test environment after local development, and upload it to the production environment after the test environment is determined.

When the team collaborates with others or special situations occur, for example, new dependencies are installed in the local and test environments, the production environment is not installed in a timely manner, and git is uploaded to the production environment.

There are even special cases where we need to merge code in production (don’t ask me how I know that). In this case, a code conflict occurred during the merge process in production environment, which must affect the normal access of the project.

With K8S, we can solve this problem gracefully:

Kubernetes brings changes to the application or its configuration online step by step, while monitoring application health to ensure that all instances are not terminated at the same time. If there is a problem, Kubernetes will roll back the changes for you.

Auto repair

I once had an accident because I didn’t manage the server disk well, and I didn’t have a computer by my side at that time.

Since then, I have set alarms for ECS/RDS, etc., so that when there are hidden dangers or abnormalities, I can receive information and deal with it in time.

At that time I was thinking 🤔 a problem: the alarm is useful, there is any way to achieve automatic repair?

Now, K8S can help us:

K8S can automatically dynamically scale applications using simple commands, a UI, or based on CPU usage.

If the disk usage problem I mentioned above occurs, K8S can automatically help me expand the capacity. (No more carrying a Mac when going out on weekends 😄)

And when the container has an exception, K8S can restart the failed container, replace and reschedule containers when the node dies, kill containers that do not respond to user-defined health checks, and do not publish them to the client until they are ready to serve.

That’s right, K8S allows us to keep our apps in the event of server problemsself-healing, dynamic expansion and contraction.

Load balancing

The concept of load balancing has long been in the minds of back-end development engineers.

Kubernetes provides the container with its own IP address and a DNS name, and can load balance between them.

The K8S implements load balancing intelligently and stably through cluster management, dynamic capacity expansion, and automatic SLB update to cope with concurrent scenarios.

Spring river warm duck prophet

Major manufacturers have the most keen sense of smell. I searched K8S on Baidu, and so many cloud manufacturers are advertising and providing K8S solutions. (Determined to sort out a review of the use of K8S by major cloud vendors 😈)

The major cloud manufacturers into the game and in a way to reduce the learning threshold, after all, their own from 0 to build K8S container layout management or to learn a lot of concepts, and cloud manufacturers to provide solutions will certainly greatly reduce our learning cost. (I’m getting a little judgmental.)

This has promoted the popularity of K8S from another Angle.

conclusion

With the rise and maturity of container technology, K8S can realize the automatic deployment, automatic capacity expansion, maintenance and other functions of container cluster, coupled with the promotion of cloud vendors and provide out-of-the-box solutions.

Kubernetes will definitely catch on and become standard in application deployment operations in the near future.

The last

Thanks for reading and welcome to like, favorites,coin(attention)!!