Skip to content

Ingress

This guide explains how to configure Ingress resources for Cloudflare Tunnel.

For general information about Kubernetes Ingress resources, see the official Kubernetes Ingress documentation.

For detailed configuration options specific to Cloudflare Tunnel, refer to the ingress annotations reference.

Each ingress assigned to the cloudflare-tunnel class becomes a Cloudflare route. The controller provisions DNS records and launches cloudflared connectors that proxy traffic back to your Service.

FieldDescription
spec.rules[].hostExternal hostname to publish via Cloudflare DNS.
spec.rules[].http.paths[].backend.service.nameTarget Kubernetes Service name.
spec.rules[].http.paths[].backend.service.portService port number or name to proxy.

Example manifest:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: dashboard
namespace: kubernetes-dashboard
annotations:
kubernetes.io/ingress.class: cloudflare-tunnel
spec:
rules:
- host: dash.example.com # <- REPLACE ME!
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: kubernetes-dashboard
port:
number: 80

Consult the ingress annotations reference for advanced routing behaviour such as protocol overrides, TLS verification settings, and host header rewrites.