--- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: age-api-http-redirect namespace: age-api spec: hostnames: - age-api.k8s.syd1.au.unkin.net parentRefs: - group: gateway.networking.k8s.io kind: Gateway name: age-api sectionName: http rules: - filters: - type: RequestRedirect requestRedirect: scheme: https statusCode: 301 matches: - path: type: PathPrefix value: / --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: age-api namespace: age-api spec: hostnames: - age-api.k8s.syd1.au.unkin.net parentRefs: - group: gateway.networking.k8s.io kind: Gateway name: age-api sectionName: https rules: - backendRefs: - group: "" kind: Service name: age-api port: 80 weight: 1 matches: - path: type: PathPrefix value: /