gateway/gke-gateway-controller/ex1-simple-internal-gw.yaml (25 lines of code) (raw):
kind: Gateway
apiVersion: networking.x-k8s.io/v1alpha1
metadata:
name: internal-gw
namespace: default
spec:
class: internal
listeners:
- protocol: HTTP
port: 80
routes:
resource: httproutes
---
apiVersion: networking.x-k8s.io/v1alpha1
kind: HTTPRoute
metadata:
name: my-route
namespace: default
spec:
hosts:
- rules:
- action:
forwardTo:
- targetRef:
name: foo-svc