Skip to content

HTTPS routing problem #222

Description

@zioCristia

Following the guide it is possible to create working tunnels to redirect http traffic from the gateway and the services.
The problem I'm facing is when I need to redirect https traffic. Some services like argocd-server or Kubernates dashboard only accept traffic on port 443.

I've tried different configurations, by adding the https protocol to the gateway with a proper HTTPRoute but nothing seems to work. When connecting to the address I have 502 errors in the browser.

Example of the Gateway and the HTTPRoute for the dashboard:

apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: gateway
  namespace: cloudflare-gateway
spec:
  gatewayClassName: cloudflare
  listeners:
  - protocol: HTTP
    port: 80
    name: http
  - protocol: HTTPS
    port: 443
    name: https
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: dashboard-route
spec:
  parentRefs:
  - name: gateway
    namespace: cloudflare-gateway
  hostnames:
  - "dashboard.example.com"
  rules:
  - backendRefs:
    - name: kubernetes-dashboard-kong-proxy
      namespace: kubernetes-dashboard
      port: 443

Please note that the above gateway works fine with http routing for example to minio ui:

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: minio-ui-route
  namespace: default
spec:
  parentRefs:
  - name: gateway
    namespace: cloudflare-gateway
  hostnames:
  - "minio.example.com"
  rules:
  - backendRefs:
    - name: minio-svc
      port: 9001

Is there a way to make this work?

Appreciate any help, thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions