In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the meaning of kubernetes, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand.
What is kubernetes?
Kubernetes is an open source version of Google's large-scale container management technology, maybe most beginners realize kubernetes when learning docker, kubernetes can easily integrate docker, but docker is only one of the containers supported by kubernetes, not only docker can integrate with kubernetes, but docker is preferred because docker is more popular.
So why is there this kubernetes? This is related to the introduction of the first sentence: kubernetes is an open source version of large-scale container management technology, that is to say, kubernetes is a technology for managing large-scale container clusters, because when there are many containers to a certain extent, manual management one by one is more troublesome and time-consuming, so there are many container management solutions to facilitate the management of a large number of containers, and kubernetes is one of the better ones. So there are more users.
Concepts in kubernetes
Many new terms and concepts have been added to kubernetes. Beginners may feel dizzy and confused at first. Here are some important concepts in kubernetes.
Pod one
The first is Pod. In kubernetes, the smallest management unit is Pod rather than instances of docker or other containers. A Pod can contain multiple containers, while Pod manages these containers in a unified manner.
ClusterIP one
In a kubernetes cluster, each Pod has a virtual IP, which is randomly assigned by the kubernetes after the creation of the Pod. The IP cannot be accessed directly outside the IP, but it is interoperable inside the kubernetes, which is equivalent to a virtual local area network.
Endpoint one
If a Pod wants to provide services, it needs to open ports (it can also be solved by other ways, which is officially provided). The ClusterIP+ port number of Pod forms an Endpoint, the Endpoint provides services, and a Pod can open multiple ports, that is, it can correspond to multiple Endpoint. If you want the Endpoint to serve clients outside the kubernetes cluster, you only need to bind a native port.
Pod Manager one
In kubernetes, it is allowed to write a Pod configuration file directly and publish it to the kubernetes cluster, but this does not have any advantage over directly deploying the docker container. Kubernetes provides a better solution, that is, to manage Pod through the Pod manager, ReplicationController (later known as RC) is used in the earlier version, and Deployment is provided in the new version. This article does not compare the advantages and disadvantages of the two schemes, only through RC to introduce the advantages and disadvantages of this solution.
With RC, you can control the number of Pod through the configuration file. You only need to specify 10 instances of a Pod in the RC file, and RC will automatically deploy 10 instances of a specified Pod for you, saving a lot of deployment time. When one of the Pod dies, if the Pod is deployed directly, you need to restart it manually, and the health status of the Pod may not be monitored in real time. However, when Pod is deployed through RC, RC will automatically redeploy a Pod to ensure that the total number of Pod remains the same when the Pod is dead.
Service one
In the kubernetes private network, calling a service can be called through the clusterIP+port of Pod, but because the clusterIP of Pod is randomly assigned after the creation of the Pod, that is, the clusterIP of the Pod cannot be known in advance, and the Pod may be rebuilt, and when the Pod is rebuilt, the IP will change accordingly, which creates a problem. Kubernetes also provides a solution to the use of environment variables, that is, an environment variable is added to save the IP of Pod when the Pod is created. Other service callers can obtain the IP of the Pod through the environment variable, and then call the service. However, there are some obvious shortcomings in the above method, which requires writing the dead IP, but the IP written before the reconstruction of the Pod will become invalid. If the IP is obtained through the environment variable, then the Pod may be rebuilt, so it is troublesome to re-obtain it every time it is used, so kubernetes provides the concept of Service to solve this problem.
For a service, you can write a Service to provide services uniformly. The IP of Service is fixed. At the same time, Service not only solves the problem that the IP of Pod cannot be determined. If there are multiple Pod providing the same service, then you can also do load balancing for these Pod through Service. Service will distribute requests to different Pod according to the specified load balancing policy.
With Service, you can invoke services through IP, but Service's IP is not easy to remember, so what to do? Kubernetes also provides a complete set of DNS services, through the DNS service, you can call the service through the name of the Service, while the DNS service will convert the name of the Service to the IP of Service.
Node one
In kubernetes, a Node corresponds to a host or a virtual machine. Node is the carrier of Pod, and all Pod is deployed in Node. When you expand a host, you only need to add some configurations, and the host can be automatically discovered by kubernetes's master and configured as a Node for subsequent deployment of Pod.
Thank you for reading this article carefully. I hope the article "what is the meaning of kubernetes" shared by the editor will be helpful to everyone? at the same time, I also hope that you will support and pay attention to the industry information channel, and more related knowledge is waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.