1.7 KiB
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
- Auth key: Tailscale admin console -> Settings -> Keys -> Generate auth key. Reusable: off, Ephemeral: off, Pre-approved: on (if offered).
- Store it in OpenBao at
secret/tailscale, keyauthkey(UI: secret/ -> Create secret, pathtailscale). ESO turns it into the Secrettailscale-auth. - Deploy via ArgoCD (
apps-in-appsentrytailscale). - 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).
- Edit route settings -> approve
- Install the Tailscale app on phone/laptop, sign in with the same account. Open
https://jellyfin.smokyzone.dewhile 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.derecords are public and resolve to192.168.2.218everywhere (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.218through the tunnel to this pod, which forwards it to the node's NodePorts. - Android: Android allows only one VPN at a time.