Files
zeekayandHanzo Dev 15d100931d
Hanzo CI/CD / cicd (push) Failing after 9m46s
CI/CD / cicd (push) Failing after 10m4s
Name the ingress in the docs, and fix what that exposed
Most of it was stale, not cosmetic: the docs taught `TRAEFIK_*` env,
`traefik.http.*` labels, `traefik.ingress.kubernetes.io/` annotations,
`.traefik.yml` plugins and `traefik_*` metrics. This binary answers to
`INGRESS_*`, `ingress.http.*`, `ingress.kubernetes.io/`, `.ingress.yml` and
`ingress.*` — a reader following the old text configured nothing.

Two were worse than stale. Gateway API examples gave `group: traefik.io` for an
IngressService backendRef, which kubernetes.go:1265 refuses against hanzo.ai.
The contributing guide built with `github.com/traefik/ingress` ldflags against
a module that is `github.com/hanzoai/ingress/v3`.

script/code-gen.sh globs `hanzo.ai_*.yaml` and matched nothing — the per-CRD
dumps had been deleted and never regenerated, so `cat` failed the script under
`set -e`. controller-gen v0.19.0 restores all ten; they concatenate
byte-for-byte into the committed definition and fixture.

CHANGELOG.md is untouched: 6,789 lines of imported release history, where a
rewrite would falsify the record rather than rebrand it. `@traefiklabs/faency`,
`traefik/whoami`, k3s's `--disable=traefik`, the `traefik.io` CRD group and the
MIT attribution stay — upstream's addresses, not our brand.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-16 13:01:19 -07:00

3.9 KiB

Exposing Services with Hanzo Ingress

This section guides you through exposing services securely with Hanzo Ingress. You'll learn how to route HTTP and HTTPS traffic to your services, add security features, and implement advanced load balancing.

What You'll Accomplish

Following these guides, you'll learn how to:

  • Route HTTP traffic to your services with Gateway API and IngressRoute
  • Configure routing rules to direct requests
  • Enable HTTPS with TLS
  • Add security middlewares
  • Generate certificates automatically with Let's Encrypt
  • Implement sticky sessions for session persistence

Platform-Specific Guides

For detailed steps tailored to your environment, follow the guide for your platform:

Advanced Use Cases

Exposing gRPC Services

Hanzo Ingress supports gRPC applications without requiring specific configuration. You can expose gRPC services using either HTTP (h2c) or HTTPS.

??? example "Using HTTP (h2c)"

For unencrypted gRPC communication, configure your service to use the `h2c://` protocol scheme:

```yaml
http:
  routers:
    grpc-router:
      service: grpc-service
      rule: Host(`grpc.example.com`)
  
  services:
    grpc-service:
      loadBalancer:
        servers:
          - url: h2c://backend:8080
```

!!! note
    For providers with labels (Docker, Kubernetes), specify the scheme using:
    `ingress.http.services.<service-name>.loadbalancer.server.scheme=h2c`

??? example "Using HTTPS"

For encrypted gRPC communication, use standard HTTPS URLs. Hanzo Ingress will use HTTP/2 over TLS to communicate with your gRPC backend:

```yaml
http:
  routers:
    grpc-router:
      service: grpc-service
      rule: Host(`grpc.example.com`)
      tls: {}
  
  services:
    grpc-service:
      loadBalancer:
        servers:
          - url: https://backend:8080
```

Hanzo Ingress handles the protocol negotiation automatically. Configure TLS certificates for your backends using [ServersTransport](../reference/routing-configuration/http/load-balancing/serverstransport.md) if needed.

Exposing WebSocket Services

Hanzo Ingress supports WebSocket (WS) and WebSocket Secure (WSS) connections out of the box. No special configuration is required beyond standard HTTP routing.

??? example "Basic WebSocket"

Configure a router and service pointing to your WebSocket server. Hanzo Ingress automatically detects and handles the WebSocket upgrade:

```yaml
http:
  routers:
    websocket-router:
      rule: Host(`ws.example.com`)
      service: websocket-service
  
  services:
    websocket-service:
      loadBalancer:
        servers:
          - url: http://websocket-backend:8000
```

??? example "WebSocket Secure (WSS)"

For encrypted WebSocket connections, enable TLS on your router. Clients connect using `wss://` while you can choose whether backends use encrypted or unencrypted connections:

```yaml
http:
  routers:
    websocket-secure-router:
      rule: Host(`wss.example.com`)
      service: websocket-service
      tls: {}
  
  services:
    websocket-service:
      loadBalancer:
        servers:
          - url: http://websocket-backend:8000  # SSL termination at Hanzo Ingress
          # OR
          # - url: https://websocket-backend:8443  # End-to-end encryption
```

Hanzo Ingress preserves WebSocket headers including `Origin`, `Sec-WebSocket-Key`, and `Sec-WebSocket-Version`. Use the [Headers middleware](../reference/routing-configuration/http/middlewares/headers.md) if you need to modify headers for origin checking or other requirements.