当前位置:网站首页>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 .
边栏推荐
- Sorting out XXL job learning
- Hibernate operation Oracle database primary key auto increment
- Centos7 command line installation Oracle11g
- Nifi from introduction to practice (nanny level tutorial) - identity authentication
- DM8:达梦数据库-锁超时
- Review summary of database
- Size end byte order
- How to close windows defender Security Center
- PyCharm汉化
- The browser enters the URL address, and what happens to the page rendering
猜你喜欢
随机推荐
Win10彻底永久关闭自动更新的步骤
Centos7 command line installation Oracle11g
TCP 流控问题两则
昨天访问量破记录
uni-app开发微信小程序动态渲染页面,动态改变页面组件模块顺序
与生活握手言和
中证500股指期货怎么开户,国内正规的股指期货平台有哪些,在哪里开户最安全?
Word text box page feed
Socket blocking and non blocking modes
使用bitnamiredis-sentinel部署Redis 哨兵模式
yml的配置
GCC compiling dynamic and static libraries
Viewpager2 usage record
【TcaplusDB知识库】TcaplusDB-tcapulogmgr工具介绍(一)
Stack calculation (whether the order of entering and leaving the stack is legal) - Code
诗歌一首看看
socket阻塞和非阻塞模式
【TcaplusDB知识库】TcaplusDB-tcapsvrmgr工具介绍(三)
What is the next step in the recommendation system? Alispacetime aggregates GNN, and the effect is to sling lightgcn!
nmcli team bridge 基本配置









