gateway/multi-cluster/mcg-internal-blue-green/route-step-4b-implicit-even-split.yaml (16 lines of code) (raw):
kind: HTTPRoute
apiVersion: networking.x-k8s.io/v1alpha1
metadata:
name: sample-app-route
namespace: mcgi-bg
labels:
gateway: multi-cluster-gateway
spec:
rules:
- forwardTo:
# commenting out explicit load balancing and replacing with implicit load balancing
- backendRef:
group: net.gke.io
kind: ServiceImport
name: sample-app # no longer cluster-specific
port: 8080
weight: 100
#- backendRef:
# group: net.gke.io
# kind: ServiceImport
# name: sample-app-blue
# port: 8080
# weight: 50 # even 50/50 split
#- backendRef:
# group: net.gke.io
# kind: ServiceImport
# name: sample-app-green
# port: 8080
# weight: 50 # even 50/50 split