--- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: vlogs-http-redirect namespace: vlogs spec: hostnames: - vlogs.unkin.net parentRefs: - group: gateway.networking.k8s.io kind: Gateway name: vlogs-external 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: vlogs namespace: vlogs spec: hostnames: - vlogs.unkin.net parentRefs: - group: gateway.networking.k8s.io kind: Gateway name: vlogs-external sectionName: https rules: # Exact / outranks the PathPrefix catch-all; target needs the trailing slash - filters: - type: RequestRedirect requestRedirect: path: type: ReplaceFullPath replaceFullPath: /select/vmui/ statusCode: 302 matches: - path: type: Exact value: / - backendRefs: - group: "" kind: Service name: vlogs-oauth2 port: 80 weight: 1 matches: - path: type: PathPrefix value: /