Skip to main content

Tunnel

Tunnel Custom Resource

apiVersion: ingress.k8s.ngrok.com/v1alpha1

kind: Tunnel

Tunnels are automatically created by the controller based on the created Ingress/Gateway/CloudEndpoint/AgentEndpoint resources. A tunnel will be created for each backend service name and port combination. Tunnels are automatically-created and managed but the custom resource provides a useful way to inspect established tunnels and should not be edited directly.

Tunnel Structure and Types

The following outlines the high level structure and typings of a Tunnel

Loading…

Tunnel Fields

The following sections outline each field of the Tunnel custom resource, whether they are required, what their default values are (if applicable), and a description of their purpose/constraints.

spec

spec defines the desired state of the Tunnel

Type: Object

Required: yes

Default: none

Fields:

Field NameTypeRequiredDefaultDescription
spec.forwardsTostringyesnoneThe name and port of the service to forward traffic to
spec.labelsmap[string]stringnononeKey/value pairs that are attached to the tunnel
spec.backendObjectnononedefines the configuration for backend connections to services
spec.appProtocolstring (enum)nononeSpecifies the application protocol to use when connecting to the backend

spec.forwardsTo

The name and port of the service to forward traffic to

Type: string

Required: yes

Default: none

spec.labels

Key/value pairs that are attached to the tunnel

Type: map[string]string

Required: no

Default: none

spec.backend

Defines the configuration for backend connections to Services.

Type: Object

Required: no

Default: none

Fields:

Field NameTypeRequiredDefaultDescription
spec.backend.protocolstring (enum)yesnoneSpecifies the transport protocol to use when connecting to the backend

spec.backend.protocol

Specifies the transport protocol to use when connecting to the backend. Currently only TCP and TLS are supported.

Type: string (enum)

Required: yes

Default: none

Allowed Values: "TCP","TLS"

spec.appProtocol

Specifies the application protocol to use when connecting to the backend. Currently only http1 and http2 are supported with prior knowledge.

Type: string (enum)

Required: yes

Default: "http1"

Allowed Values: "http1","http2"

Example Tunnel

Loading…