Skip to content
Ingress: publish a TCP service

Ingress: publish a TCP service

Team shop wants developers on the tailnet to reach the dev database directly, without VPN or port-forward.

apiVersion: tsunaro.io/v1alpha1
kind: TailnetIngress
metadata:
  name: shop
  namespace: shop-dev                 # tenant namespace: the tenant owns the CR
spec:
  tailnetRef: { name: corp }
  allowFrom: [group:shop]             # who may connect (operator-owned policy)
  exposes:
    - { name: postgres, port: 5432, backend: { service: shop-db-rw, port: 5432 } }
kubectl -n shop-dev get tailnetingress shop
# NAME   TAG                HOSTNAME       HOSTS                                             READY   AGE
# shop   tag:ingress-shop   ingress-shop   [shop-shop-dev.prod-1.tailnet.example.internal]   True    2m

From a laptop in group:shop: psql -h shop-shop-dev.prod-1.tailnet.example.internal -p 5432 (or ingress-shop via MagicDNS).

ConditionMeaningFix
PolicyGranted=False/PolicyDeniedan allowFrom entry is outside the admin allowlist (Tailnet.spec.policy.ingressSourceAllowlist)use an allowed principal (e.g. a group:), or ask the admin to widen the allowlist
BackendsReachable=Falseshop-db-rw:5432 does not answer from the agent podService/port wrong, backend down, NetworkPolicy in the tenant namespace blocks the agent
TagKnown=Falsesee egress table above

Source: docs/how-to/ingress-tcp.md at v0.18.0 — found a mistake? Tell us.