Tunnels

A Tunnel represents a connection to a tunnel provider. It references a TunnelProvider and can have multiple TunnelBindings attached.

Tunnel Resource

apiVersion: ktube.dev/v1alpha1
kind: Tunnel
metadata:
  name: my-tunnel
  namespace: default
spec:
  providerRef:
    name: cloudflare-provider  # Reference to TunnelProvider
status:
  phase: Running
  tunnelId: "abc123..."
  message: "Tunnel is running"

Spec Fields

FieldTypeDescription
providerRef.namestringName of TunnelProvider to use

Status Fields

FieldDescription
phaseCurrent state: Pending, Provisioning, Running, Failed
tunnelIdProvider-specific tunnel identifier
messageHuman-readable status message

Lifecycle

  1. Pending - Tunnel created, waiting for provider validation
  2. Provisioning - Creating tunnel with provider API
  3. Running - Tunnel active and ready for bindings
  4. Failed - Error occurred (check message field)

Example

apiVersion: ktube.dev/v1alpha1
kind: Tunnel
metadata:
  name: production-tunnel
  namespace: production
spec:
  providerRef:
    name: cloudflare-prod

Related