In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the relevant knowledge of "what is K8S". In the operation of actual cases, many people will encounter such a dilemma. Then 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!
I. current situation of use
At present, our services are deployed on both virtual machines and K8S, and the addresses of services deployed on virtual machines on eureka are easy to understand, that is, the ip addresses of virtual machines, so the question is, what is the address provided on eureka for services deployed on K8s?
Just say the answer: it's pod's address.
The network on K8S can be configured to be investigated, but in any case, the address registered on eureka must be accessible.
Second, the network foundation of K8S
The application on K8S runs in the container and the container is in the Pod.
Each Pod is attached to the same large, flat IP network, called the Pod network (usually the VXLAN overlay network).
Each Pod has its own unique IP address, which is routable in the Pod network.
The combination of these three factors enables each application (the components and services of the application) to communicate directly without going through a network process such as NAT.
Dynamic network
When you scale up the application horizontally, a new Pod will be added to the Pod network, and the new Pod will naturally be accompanied by a new IP address. If the application is scaled down, the old Pod and its IP will be deleted. The process seems chaotic.
The same is true for rolling updates and withdrawals of applications-adding a new version of Pod or removing an old version of Pod. The new Pod will add the new IP to the Pod network, and the terminated old Pod will delete its existing IP.
If nothing else, each application service needs to monitor the network and manage a list of healthy Pod. This process can be very painful, and it is inefficient to write this logic in each application. Fortunately, Kubernetes does this with an object-- Service.
One more thing to note: Kubernetes performs IP address management (IPAM) duties, tracking IP addresses that are used and available on the Pod network.
3. Service of K8S
The Kubernetes Service object creates a stable network endpoint in front of a set of serviced Pod and distributes the load for those Pod.
A Service object is typically placed before a set of Pod that does the same thing.
The client communicates with Service, and Service is responsible for balancing the traffic load to Pod.
In the figure above, the Pod at the bottom changes due to scaling, updates, failures, and so on, and Service tracks these changes. At the same time, the name, IP, and port of the Service will not change.
Service load balancing is a simple layer 4 polling. It works at the connection level, so all requests made in the same connection go into the same Pod. Because it works on layer 4, it is imperceptible to things like HTTP headers or Cookie on layer 7.
This is the end of "what is K8S"? 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.
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.