Istio Ingress Gateway and VirtualService¶
Istio Ingress Gateway and VirtualService are configuration resources used within an Istio Service mesh to manage inbound external traffic. The Ingress Gateway operates at the boundary of the network, receiving incoming traffic, while the VirtualService defines the rules for how that traffic should be routed and handled, such as upgrading connections to use WebSockets.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-websockets-readme.md]
Function and Purpose¶
An Ingress Gateway acts as the entry point for external traffic entering the mesh.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-websockets-readme.md] It handles the reception of requests and works in conjunction with a VirtualService, which contains the specific routing logic.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-websockets-readme.md] This routing logic can include advanced protocols features, such as upgrading a standard HTTP connection to a WebSocket connection.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-websockets-readme.md]
Support for WebSocket upgrades via these routing rules was a feature added to the v1alpha3 routing rules after the release of Istio v0.8.0.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-websockets-readme.md]
Configuration Workflow¶
To implement these resources, a user typically follows a workflow involving the application deployment and the application of configuration manifests:
- Application Deployment: The underlying application (Kubernetes
ServiceandDeployment) is deployed.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-websockets-readme.md] This can be done with manual sidecar injection usingistioctlor with Automatic sidecar injection enabled on the namespace.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-websockets-readme.md] - Resource Application: The
GatewayandVirtualServiceconfigurations are created, often by applying aroute.yamlfile.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-websockets-readme.md] - Access: Traffic is directed to the exposed Ingress Gateway IP and ports.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-websockets-readme.md]
Related Concepts¶
- Service Mesh
- Kubernetes
- [[Sidecar]]
Sources¶
^[400-devops-07-monitoring-and-observability-k8s-istio-samples-websockets-readme.md]