Files
tailscale-gitops/README.md
T
2026-10-18 14:17:25 +02:00

1.7 KiB

tailscale-gitops

Tailscale subnet router for the single-node cluster (loki). It joins your tailnet as loki-k8s and advertises only 192.168.2.218/32, so devices in the tailnet reach the node - and with it all ingress hostnames (https://<app>.smokyzone.de) - from anywhere, without exposing anything to the internet.

Runs in userspace mode (no privileged, no NET_ADMIN, no /dev/net/tun). The node identity is stored in the Kubernetes Secret tailscale-state, so it survives restarts.

Setup

  1. Auth key: Tailscale admin console -> Settings -> Keys -> Generate auth key. Reusable: off, Ephemeral: off, Pre-approved: on (if offered).
  2. Store it in OpenBao at secret/tailscale, key authkey (UI: secret/ -> Create secret, path tailscale). ESO turns it into the Secret tailscale-auth.
  3. Deploy via ArgoCD (apps-in-apps entry tailscale).
  4. Admin console -> Machines -> loki-k8s:
    • Edit route settings -> approve 192.168.2.218/32.
    • Disable key expiry (otherwise the node logs out after 180 days).
  5. Install the Tailscale app on phone/laptop, sign in with the same account. Open https://jellyfin.smokyzone.de while on mobile data.

The auth key is only used for the first login. Afterwards it can expire or be revoked. To re-register from scratch: delete the Secret tailscale-state and provide a new key.

How it fits together

  • DNS: the *.smokyzone.de records are public and resolve to 192.168.2.218 everywhere (when the client uses a resolver that doesn't filter private IPs, e.g. 1.1.1.1).
  • Routing: the Tailscale client sends traffic for 192.168.2.218 through the tunnel to this pod, which forwards it to the node's NodePorts.
  • Android: Android allows only one VPN at a time.