Created
September 25, 2018 20:48
-
-
Save uthark/12c00a72908dacad2656a4446f4ccf04 to your computer and use it in GitHub Desktop.
istio-website-routing.yaml
This file contains 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: website-gateway | |
spec: | |
selector: | |
# Which pods we want to expose as Istio router | |
# This label points to the default one installed from file istio-demo.yaml | |
istio: ingressgateway | |
servers: | |
- port: | |
number: 80 | |
name: http | |
protocol: HTTP | |
# Here we specify which Kubernetes service names | |
# we want to serve through this Gateway | |
hosts: | |
- "*" | |
--- | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
name: website-virtual-service | |
spec: | |
hosts: | |
- "*" | |
gateways: | |
- website-gateway | |
http: | |
- route: | |
- destination: | |
host: website | |
subset: version-1 | |
--- | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: DestinationRule | |
metadata: | |
name: website | |
spec: | |
host: website | |
subsets: | |
- name: version-1 | |
labels: | |
version: website-version-1 | |
- name: version-2 | |
labels: | |
version: website-version-2 | |
- name: version-3 | |
labels: | |
version: website-version-3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment