This episode covers Tailscale in the container world: the tailscale/tailscale sidecar pattern in Docker, running tailscale up in immutable containers, and the Tailscale Kubernetes Operator for Ingress, Egress, Service load balancers, and workload identity.

In episode 15 you learned to expose services. But what if your apps run as containers — on Docker or Kubernetes? Running Tailscale in a container has its own challenges: no systemd, state must persist, and containers are ephemeral.
Episode 16 covers three patterns: the official tailscale/tailscale image as a sidecar in Docker, running tailscale up in immutable containers, and the Tailscale Kubernetes Operator for Ingress, Egress, Service load balancers, and workload identity.
The tailscale/tailscale image is purpose-built for containers. The most common pattern is a sidecar: one Tailscale container sitting next to an application container, sharing network and volumes.
docker run -d --name ts-sidecar \
--network host \
-e TS_AUTHKEY=tskey-auth-xxxx \
-e TS_HOSTNAME=container-web \
-e TS_EXTRA_ARGS=--advertise-tags=tag:server \
-v ts-state:/var/lib/tailscale \
tailscale/tailscaleThe docker run command above runs Tailscale as a daemon in a container, uses an auth key for provisioning, and stores state in the ts-state volume so identity survives container restarts.
Containers are immutable — no systemd and an ephemeral filesystem. The correct pattern:
TS_AUTHKEY env var for browser-free authentication.tailscaled.docker volume create ts-state
docker run -d --name ts -v ts-state:/var/lib/tailscale tailscale/tailscaleWith the ts-state volume, every container restart keeps the same node identity — without it, a new node appears on every restart.
/var/lib/tailscale.TS_HOSTNAME and tags for clear identity.--network host unless necessary; use port mapping instead.The Tailscale Kubernetes Operator is a component that integrates Kubernetes with a tailnet natively. With the operator, you don't write manual sidecars — just define resources and the operator handles provisioning, auth, and networking.
Installation via Helm:
helm repo add tailscale https://tailscale.github.io/k8s-operator
helm install operator tailscale/tailscale-operator \
--namespace tailscale --create-namespaceThe operator provides two main modes:
apiVersion: tailscale.com/v1alpha1
kind: ProxyGroup
metadata:
name: ingresses
spec:
type: ingress
proxyPort: 80The ProxyGroup resource with type: ingress above makes a cluster Service reachable from the tailnet. This declarative approach is what makes the operator so convenient for large teams.
With the operator, you can also create LoadBalancer Services backed by Tailscale — traffic to the Service is automatically available on the tailnet. For workloads that need identity, the operator supports workload identity: pods are recognized as Tailscale nodes with specific tags, so ACLs can govern access between workloads granularly.
Docker -> tailscale/tailscale sidecar + state volume
Kubernetes -> Operator (Ingress/Egress, LoadBalancer, identity)Containers change how you deploy, and Tailscale follows: the official image for simple sidecar patterns, and the Kubernetes Operator for native, declarative integration.
Episode 16 brought Tailscale into the container world: you understand the Docker sidecar pattern with persistent state, how to run tailscale up in immutable containers, and the power of the Kubernetes Operator for Ingress, Egress, and load balancers.
Key takeaways:
tailscale/tailscale image for the sidecar pattern.In the next episode, episode 17, we'll cover API, OAuth, and automation — managing devices, keys, and ACLs via the REST API, OAuth apps for device provisioning, plus the Terraform Provider and automated provisioning workflows with scripts and Ansible.