Skip to content

K8s HTTP Gateway Route

udx-github edited this page Jul 3, 2026 · 3 revisions

Creates a Kubernetes Gateway API HTTPRoute that routes traffic from the shared HTTP gateway to a backend service.

Use this module when a Rabbit service needs to expose an application through the shared Gateway API load balancer with hostname-based routing.

Supported Features

  • HTTPRoute creation using the Gateway API (gateway.networking.k8s.io/v1).
  • Hostname-based routing to backend services.
  • Parent gateway reference to the shared shared-http gateway.
  • Configurable backend port.

Prerequisites

  • A kubeconfig secret created by the k8s-access module.
  • The shared HTTP gateway provisioned by k8s-shared-http-gateway.
  • The target namespace must have the gateway-access: shared label.
  • The backend service must exist in the same namespace.

Important Notes

  • The HTTPRoute references the shared-http gateway in the gateway namespace.
  • hostnames determines which domains are routed to this backend.
  • The route matches all paths (/ prefix) by default.
  • The backend service name matches the name field.

Minimal Example

services:
  - name: "k8s HTTP Gateway Route"
    module: "k8s-http-gateway-route"
    id: "http-route"
    deployment_order: 93
    configurations:
      name: "www-example-com"
      namespace: "www-example-com"
      port: 80
      hostnames:
        - "example.com"
        - "www.example.com"

Outputs

This module does not produce outputs.

Full Configuration Schema

The fields below are public module inputs under configurations.

configurations:
  name: "k8s-http-route"
  namespace: "k8s-gateway"
  port: 80
  gateway-access: "shared"
  gateway-namespace: "k8s-gateway"
  hostnames: ["example.com"]
  secret_labels:
    creator: "automation"
    r2a_module: "k8s-shared-http-gateway"
Field Type Required Description
name string Yes HTTPRoute name and backend service name.
namespace string Yes Namespace for the HTTPRoute.
port number No Backend service port. Defaults to 80.
gateway-access string No Gateway access label value. Defaults to shared.
gateway-namespace string No Namespace of the shared gateway. Defaults to k8s-gateway.
hostnames array[string] Yes Hostnames to route to this backend.
secret_labels map[string] No Labels for associated secrets.

Clone this wiki locally