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 |
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 '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...?!