Last active
September 10, 2019 08:43
-
-
Save ymesika/c64326e3d8b4ff2c1e2b53c1e13ac72a to your computer and use it in GitHub Desktop.
Websockets Demo (Istio v0.7.1 / Istio Nightly Build)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: tornado | |
labels: | |
app: tornado | |
spec: | |
ports: | |
- port: 8888 | |
name: http | |
selector: | |
app: tornado | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: tornado | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: tornado | |
version: v1 | |
spec: | |
containers: | |
- name: tornado | |
image: hiroakis/tornado-websocket-example | |
imagePullPolicy: IfNotPresent | |
ports: | |
- containerPort: 8888 | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: tornado-gateway | |
annotations: | |
kubernetes.io/ingress.class: "istio" | |
spec: | |
rules: | |
- http: | |
paths: | |
- path: /.* | |
backend: | |
serviceName: tornado | |
servicePort: 8888 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: config.istio.io/v1alpha2 | |
kind: RouteRule | |
metadata: | |
name: tornado-websocket | |
spec: | |
destination: | |
name: tornado | |
match: | |
request: | |
headers: | |
uri: | |
prefix: / | |
websocketUpgrade: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.istio.io/v1alpha3 | |
kind: Gateway | |
metadata: | |
name: tornado-gateway | |
spec: | |
selector: | |
istio: ingressgateway | |
servers: | |
- port: | |
number: 80 | |
name: http | |
protocol: HTTP | |
hosts: | |
- "*" | |
--- | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
name: tornado | |
spec: | |
hosts: | |
- "*" | |
gateways: | |
- tornado-gateway | |
http: | |
- match: | |
- uri: | |
prefix: / | |
route: | |
- destination: | |
host: tornado | |
weight: 100 | |
websocketUpgrade: true |
I'm seeing the same thing - 503.
istio 1.0.5, self-managed kube cluster (1.10)
I retried using this (which is not really different...?!) and have no idea what was different from my earlier attempts (I did a restart setting up a new cluster etc.), but now it works!!
When I 'kubectl delete' the two .yaml files and then try to 'kubectl create' them again I end up with 503 again... How can I get it working again...?!
Ah, when I delete the istio-ingressgateway via the gui it restarts itself and then it works again.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I install this using the tornado_rule_v3.yaml the tornado-gateway part of the tornado.yaml should be left out I think. However when I do that I get a 503 when I open the ip address in the browser. No idea what I am doing wrong following the instructions closely and tried several times now... Any idea?
Actually the 'kubectl get ingress -o wide' to find the ingress ip and port returns: 'No resources found'. But I can find the ip and port from the GKE UI I think, however this returns the 503.
istio: 1.0.3
gke: 1.10.9-gke.5