Created
September 8, 2023 16:24
-
-
Save asayah/828fad9b9c26692e832429fc8b8cc59c to your computer and use it in GitHub Desktop.
route table
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
kubectl --context "$workload_context" apply -f - <<EOF | |
apiVersion: networking.gloo.solo.io/v2 | |
kind: RouteTable | |
metadata: | |
name: reviews | |
namespace: bookinfo | |
spec: | |
hosts: | |
- 'reviews.bookinfo.svc.cluster.local' | |
applyToDestinations: | |
- selector: | |
labels: | |
app: reviews | |
http: | |
# Route for the reviews service | |
- name: reviews-canary | |
# Prefix matching | |
matchers: | |
- uri: | |
prefix: /reviews | |
forwardTo: | |
destinations: | |
- ref: | |
name: reviews | |
namespace: bookinfo | |
cluster: workload | |
port: | |
number: 9080 | |
subset: | |
version: v1 | |
weight: 75 | |
- ref: | |
name: reviews | |
namespace: bookinfo | |
cluster: workload | |
port: | |
number: 9080 | |
subset: | |
version: v2 | |
weight: 25 | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment