A brief description of the relationship between k8s and Docker

A brief description of the relationship between k8s and Docker

Recently, the project uses kubernetes (hereinafter referred to as k8s, there are 8 letters between k and s). Although I have used it simply before, I recently found that k8s has many concepts and the commands are not enough, so I would like to take this opportunity to write something to have a more comprehensive understanding and use of k8s. The purpose of this article is to give you a more comprehensive understanding of k8s concepts and learn common operations in work. The overall focus is more on principles and applications. Before officially starting k8s, let's take a look at the relationship between k8s and Docker, and describe why to use containers from the perspective of virtualization and deployment methods. Let's get started.

Currently, there is no article comparing the background and requirements of Kubernetes and Docker technologies. This article starts from the perspective of the purest official definition and explains the background of the two technologies and how they compare with traditional technologies.

Brief Introduction:
Official definition 1: Docker is an open source application container engine that allows developers to package their applications and dependencies into a portable container and publish them to popular Linux machines, which can also be virtualized.

Official definition 2: k8s is an open source container cluster management system that can realize functions such as automatic deployment, automatic expansion and reduction, and maintenance of container clusters.

Compared with traditional technology:
Next, let’s look at two classic pictures:

1. From the perspective of virtualization:

Figure 1

The above picture shows the difference between Docker container (something that can be managed by k8s) and traditional virtualization methods. Traditional virtualization technology, after virtualizing physical hardware into multiple sets of hardware, needs to deploy an operating system on each set of hardware, and then run the corresponding applications on these operating systems. The application process in the Docker container runs directly on the kernel of the host machine (real physical machine). The Docker engine packages some independent applications and their respective dependencies, and runs them independently and directly on the non-virtualized host hardware. At the same time, each container does not have its own kernel, which is obviously lighter than a traditional virtual machine. Each cluster has multiple nodes, and each node can be managed. Our kubernete is born to manage the small operating environment (container) where these applications are located.

2. From the deployment perspective

Figure 2

Please note that you should not confuse this picture with the Docker picture above. Figure 1 illustrates the virtualization operations required to provide the necessary operating environment for the application from a virtualization perspective (i.e. traditional: virtualized virtual machines with operating systems installed, Docker: containers managed by the container engine).

Figure 2 shows the situation when real applications are deployed on these specific operating environments. The traditional way is to deploy all applications directly on the same physical machine node. In this way, the dependencies of each App are exactly the same, and it is impossible to isolate the Apps. Of course, for isolation, we can also create virtual machines to deploy Apps into them (as shown in the upper part of Figure 1), but this is too cumbersome, so Docker technology, which is lighter than virtual machines, appeared. Now we deploy applications by deploying Container technology, and all Containers can run on the container engine. Since you think virtual machines are too cumbersome and want to use Docker, then go ahead and use it. But how do you use it? Create them manually one by one? Of course not, so kubernetes technology appeared, and it was time for the container cluster management system represented by kubernetes to come on stage.

To put it simply, we use kubernetes to manage Docker clusters, which means that Docker can be regarded as a low-level component used inside Kubernetes. In addition, kubernetes not only supports Docker, but also Rocket, which is another container technology. I hope that the simple description in this article can give you some understanding and knowledge of both.

This is the end of this article about the simple explanation of the relationship between k8s and Docker. For more information about the relationship between k8s and Docker, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Docker+K8S cluster environment construction and distributed application deployment
  • Implementation of k8s deployment of docker container
  • How to build a K8S cluster and install docker under Hyper-V
  • Docker learning notes k8s deployment method

<<:  Details of using Vue slot

>>:  How to install mysql8.0.23 under win10 and solve the problem of "the service does not respond to the control function"

Recommend

JavaScript implements Tab bar switching effects

Here is a case that front-end developers must kno...

How to prevent Flash from covering HTML div elements

Today when I was writing a flash advertising code,...

Steps to install MySQL using Docker under Linux

As a tester, you may often need to install some s...

Six important selectors in CSS (remember them in three seconds)

From: https://blog.csdn.net/qq_44761243/article/d...

Analysis of the pros and cons of fixed, fluid, and flexible web page layouts

There is a question that has troubled web designe...

The order of event execution in the node event loop

Table of contents Event Loop Browser environment ...

How to assign default values ​​to fields when querying MySQL

need When querying a field, you need to give the ...

CSS3 uses var() and calc() functions to achieve animation effects

Preview knowledge points. Animation Frames Backgr...

Summary of JavaScript custom object methods

Table of contents 1. Use object to create an obje...

Docker Compose installation methods in different environments

1. Online installation Currently only tried the L...