In the previous issue of k8s-Service Mesh Practice-Configuring Mesh, we explained how to configure Mesh requests within the cluster. Istio can also handle external traffic of the cluster, which is our common gateway. picture In fact, it is similar to the previously mentioned k8s entry to actual combat-using Ingress Ingress, which is a method of exposing internal services. Just using Istio-gateway is more flexible. picture Here is a function comparison chart, which clearly shows that Istio-gateway supports more functions. If you are a medium or large enterprise that has already used Istio, it is still recommended to have Istio-gateway, so that you can manage internal and external network traffic using the same control plane. Creating a GatewayBefore we get started, we first need to create an Istio-Gateway resource: The label that matches the selector can be associated with the gateway that comes with Istio when we install it. picture This Gateway component will be installed when we install Istio for the first time. This configuration means that the gateway will proxy all requests accessed through the domain name www.service1.io. After that, we need to use the gateway just now to bind to the service of our service. At this time, we need to use VirtualService: This is the same VirtualService configuration used for the internal traffic of the Mesh we talked about earlier. This means that traffic passing through www.service1.io and the istio-ingress-gateway gateway will enter this virtual service, but all requests will enter the subset: v1 group. This grouping information can be found in the previous section: Then we visit this domain name to get a response. At the same time, we open the Pod of the k8s-combat-service-istio-mesh service to view the log and find that all requests enter v1. If this restriction is not required, delete subset: v1. The local host needs to be configured: 127.0.0.1 www.service1.io picture Another point is that we need to get the external IP of the gateway to bind the IP to the domain name www.service1.io just now (host, or domain name management console). If you are using the kubernetes cluster that comes with docker-desktop, you can directly use 127.0.0.1, which will be bound by default. If you use minikube to install, you need to use minikube tunnel to manually bind a local IP to the service of type LoadBalancer. For details, please refer to the document: https://minikube.sigs.k8s.io/docs/tasks/loadbalancer
principlepicture The access request process is similar to the Kubernetes Ingress process mentioned earlier, except that the gateway is a service routed by VirtualService, and many routing rules can be customized in this VirtualService. SummarizeThe service mesh Istio has been basically introduced. In the future, trace, log, and metrics related to Telemetry will be updated in the operation and maintenance chapter, which will also be related to Istio. Interested friends can continue to pay attention. All source code of this article can be accessed here: https://github.com/crossoverJie/k8s-combat |
<<: Smartpedia | What is a quantum network?
According to the results of IDC's global quar...
The three major operators have already commercial...
With the development of 5G networks, everyone has...
The four common working modes of WIFI modules: tr...
On May 21, at the 2018 Global Next Generation Int...
Recently, VIAVI Solutions, a provider of communic...
[ Promotion code expired ] Title This should be th...
Recently, Symantec, a global leader in cybersecur...
5G could help realize the ideal of modular factor...
SASE (Secure Access Service Edge) and SD-WAN are ...
Although 6G is not yet a viable technology, it wi...
V5.NET offers a 30% discount code for the first o...
If we take stock of the hottest trends in the tec...
Yesterday, the highly anticipated 2024 General Ar...
The arrival of the New Year is always exciting, e...