This is a sample application that demonstrates the use of an upgraded websockets connection on an ingress traffic when using Istio
app.yaml creates a Kubernetes
Service and a
Deployment that is based on an existing Docker image for Hiroakis's Tornado Websocket Example.
Notice: The addition of websockets upgrade support in v1alpha3 routing rules has only been added after the release of
Install Istio by following the Istio Quick Start.
First install the application service:
kubectl create -f <(istioctl kube-inject -f samples/websockets/app.yaml)
kubectl create -f samples/websockets/app.yaml
Create the Ingress
VirtualService that enables the upgrade to Websocket for incoming traffic:
kubectl create -f samples/websockets/route.yaml
Access http://$GATEWAY_IP/ with your browser
WebSocket status should show a green
open status which means that a websocket connection to the server has been established. To see the websocket in action see the instructions in the REST API examples section of the demo app webpage for updating the server-side data and getting the updated data through the open websocket to the table in the webpage (without refreshing).
kubectl delete -f samples/websockets/route.yaml kubectl delete -f samples/websockets/app.yaml