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
| Field | Type | Description |
|---|---|---|
| providerRef.name | string | Name of TunnelProvider to use |
Status Fields
| Field | Description |
|---|---|
| phase | Current state: Pending, Provisioning, Running, Failed |
| tunnelId | Provider-specific tunnel identifier |
| message | Human-readable status message |
Lifecycle
- Pending - Tunnel created, waiting for provider validation
- Provisioning - Creating tunnel with provider API
- Running - Tunnel active and ready for bindings
- Failed - Error occurred (check message field)
Example
apiVersion: ktube.dev/v1alpha1
kind: Tunnel
metadata:
name: production-tunnel
namespace: production
spec:
providerRef:
name: cloudflare-prodRelated
- TunnelBindings - Bind services to tunnels
- Providers - Configure tunnel providers