当前位置:网站首页>Details of istio micro service governance grid traffic management core resource controller
Details of istio micro service governance grid traffic management core resource controller
2022-06-27 12:56:00 【Jiangxl~】
Istio Microservice governance grid traffic management core resource controller details
List of articles
1.Istio Traffic management core resource controller
Istio There are four common traffic management resources :
- Gateway( Gateway resources )
- VirtualService( Virtual service resources )
- DestinationRule( Target rule resource )
- ServiceEntry( Service portal resources )
Istio Forwarding traffic in 、 Access control 、 Grayscale publishing and other functions are realized by writing these four resource layout files .
2.Gateway Gateway resources
2.1.Gateway The concept of resources
Gateway Gateway resources are mainly used to provide an external access portal for services in the grid , Be similar to Ingress resources , Publish applications in the grid in the Internet environment .
Gateway Gateway resources need to be configured VirtualService Resources can complete the rule configuration information exposed by the application ,Gateway And VirtualService The defined forwarding rules will eventually be configured in Istio Of Ingressgateway In service .
Gateway Gateway resources can manage the traffic at the entrance and exit , Forward requests to specific applications , According to the direction of inflow and outflow, it can be divided into the following two types :
- IngressGateway: It is mainly responsible for receiving external traffic requests , Then forward the traffic to an application in the grid .
- EngressGateway: Services inside the grid need to access external applications .
Gateway The flow forwarding diagram of is shown in the figure below .
2.2.Gateway Resource list file
apiVersion: networking.istio.io/v1alpha3
kind: Gateway # The resource type is Gateway
metadata:
name: httpbin-gateway # The name of the resource
spec:
selector: # Define selector
istio: ingressgateway # relation istio Of ingressgateway
servers: # Define the service list
- port: # Define the port number used by the service
number: 80 # The port number is 80
name: http # The name of the port
protocol: HTTP # Port protocol
hosts: # Allowed hosts , It can also be a single domain name
- "*"
3.VirtualService Virtual service resources
3.1.VirtualService The concept of resources
VirtualService Resources are mainly used to define the routing rules of traffic , The traffic is forwarded to the corresponding according to the satisfied conditions Pod resources ,VirtualService Need and Gateway Associated use of resources ,Gateway The resource is equivalent to configuring the listening port , Be similar to Nginx Medium Server Configuration block , and VirtualService It is mainly used to forward traffic requests to service providers Service Resources , amount to Nginx Medium Location Configuration block ,VirtualService The resource will configure the forwarding information in Istio Of IngressGateway in .
Traffic requests will arrive first IngressGateway, configurable VirtualService Forwarding rules , Forward the request to the service provider Service Resources .
VirtualService Resources can be configured DestinationRule Resources do some flow control 、 Grayscale publishing and other functions .
VirtualService Resources are Istio Very important resources in , Just deploy the application in the grid , Will create VirtualService resources .
3.2.VirtualService Resource list file
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService # The controller type is VirtualService
metadata:
name: httpbin # Controller name
spec:
hosts: # Define host information , It can be a domain name
- "*"
gateways: # Associated corresponding gateways resources
- httpbin-gateway
http: # Definition http Traffic routing ordered list rule
- route: # The default rules , You can redirect or forward traffic
- destination: # Define rules for traffic forwarding
host: httpbin # there host Is to forward traffic to Service resources , Fill in Service The name of the resource
port: # Fill in Service The port of the resource
number: 8000
4.DestinationRule Target rule resource
4.1.DestinationRule The concept of resources
DestinationRule The functions of resources are very rich , It mainly deals with the traffic and defines the routing address of the virtual service , Can cooperate with VirtualService Resources realize the forwarding control of traffic 、 Grayscale publishing and so on , Depending on the supported policy , The application's Pod Resources are grouped , Forward different traffic to different Pod Resource group , To achieve the gray release of the program .
DestinationRule Support multiple load balancing strategies : Random 、 The weight 、 Minimum requests, etc .
4.2.DestinationRule Resource list file
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule # Define the type of resource as DestinationRule
metadata:
name: reviews # Define the name of the resource
spec:
host: reviews
trafficPolicy:
tls:
mode: istio_MUTUAL
subsets: # Define subsets, that is, various routing rules
- name: v1 # Rule name
labels: #Pod label
version: v1
- name: v2
labels:
version: v2
- name: v3
labels:
version: v3
5.ServiceEntry Service portal resources
ServiceEntry The main function of resources is to make Istio Applications in the grid connect to applications outside the cluster ,ServiceEntry The configuration information of will be saved in EngressGateway in .
边栏推荐
猜你喜欢

Topic37——64. Minimum path sum

Raspberry pie 3b+ learning

Database Series: MySQL index optimization and performance improvement summary (comprehensive version)

script defer async模式

Uni app develops wechat applet to dynamically render pages and dynamically change the order of page component modules
![[medical segmentation] unet3+](/img/93/1e9728a3dbebbf3bd9ce015552ce7a.jpg)
[medical segmentation] unet3+

让学指针变得更简单(一)

深信服X计划-系统基础总结

SSH workflow and principle

夏日里的清凉
随机推荐
Dm8: Dameng database - lock timeout
夏日里的清凉
log4j的详情配置
Custom multithreading base class threading Event
Sorting out XXL job learning
Configuration of YML
printf不定长参数原理
Uniapp drop-down layer selection box effect demo (sorting)
Airbnb double disk microservice
Bluetooth health management device based on stm32
Utilisation de la file d'attente des messages
SSH workflow and principle
What is the next step in the recommendation system? Alispacetime aggregates GNN, and the effect is to sling lightgcn!
手把手教你搭一个永久运行的个人服务器!
【Acwing】第57场周赛 题解
ssh服务器配置文件sshd_config 及操作
JMETER连接DM8
application. Configuration information of properties
解除百度文库VIP、语雀、知乎付费限制,原来这么简单
A brief talk on cordola tree