Skip to main content
🎤 Luca Berton is speaking at Red Hat Summit & KubeCon EU 2026!Learn more →
Back to Blog

Tailscale Zero Trust Networking

Tailscale creates a WireGuard mesh network for zero trust access to servers, Kubernetes clusters, and databases. Learn how Tailscale replaces VPNs.

Luca BertonFebruary 26, 20262 min read

Traditional VPNs are all-or-nothing: connect to the VPN and you can reach everything on the network. Tailscale creates a mesh network where every device connects directly to every other device, and access is controlled per-device and per-service.

How Tailscale Works

Laptop ←── WireGuard tunnel ──→ Production Server
Laptop ←── WireGuard tunnel ──→ Kubernetes Cluster
Phone  ←── WireGuard tunnel ──→ Home NAS

Every device gets a stable IP (100.x.y.z) in your tailnet. Connections are peer-to-peer, encrypted with WireGuard. No traffic flows through a central server.

Setup

bash
# Install on any device
curl -fsSL https://tailscale.com/install.sh | sh

# Connect
sudo tailscale up

# Check your IP
tailscale ip -4
# 100.64.0.1

Repeat on every device. They automatically discover each other and establish encrypted connections.

Access Control Lists

Control who can reach what:

json
{
  "acls": [
    {
      "action": "accept",
      "src": ["group:developers"],
      "dst": ["tag:dev-servers:*"]
    },
    {
      "action": "accept",
      "src": ["group:sre"],
      "dst": ["tag:production:*"]
    },
    {
      "action": "accept",
      "src": ["group:developers"],
      "dst": ["tag:production:443"]
    }
  ],
  "groups": {
    "group:developers": ["alice@myorg.com", "bob@myorg.com"],
    "group:sre": ["charlie@myorg.com"]
  },
  "tagOwners": {
    "tag:dev-servers": ["group:sre"],
    "tag:production": ["group:sre"]
  }
}

Developers can reach dev servers on all ports. SREs can reach production on all ports. Developers can only reach production on port 443 (HTTPS).

Related Course

Master this topic with hands-on labs

Go beyond reading — build real projects in sandboxed environments with expert video guidance.

Browse Courses →

Kubernetes Access

Tailscale as a Kubernetes Operator

bash
helm install tailscale-operator tailscale/tailscale-operator \
  --namespace tailscale --create-namespace \
  --set oauth.clientId=$TS_CLIENT_ID \
  --set oauth.clientSecret=$TS_CLIENT_SECRET

Expose a Kubernetes service on your tailnet:

yaml
apiVersion: v1
kind: Service
metadata:
  name: grafana
  annotations:
    tailscale.com/expose: "true"
    tailscale.com/hostname: "grafana-prod"
spec:
  selector:
    app: grafana
  ports:
    - port: 3000

Now grafana-prod is accessible on your tailnet at http://grafana-prod:3000. No Ingress, no LoadBalancer, no public IP.

kubectl Access

bash
# Register the API server on your tailnet
tailscale.com/expose: "true"  # On the API server service

# Access from any device on the tailnet
kubectl --server=https://k8s-prod:6443 get pods

SSH over Tailscale

bash
# Enable Tailscale SSH on a server
tailscale up --ssh

# SSH from any device on the tailnet
ssh user@100.64.0.2
# Or use the MagicDNS name
ssh user@prod-server

No SSH key management. Authentication uses your identity provider (Google, Okta, etc.). Access is logged and auditable.

Database Access

bash
# Tag the database server
tailscale up --advertise-tags=tag:database

# ACL: only backend services can reach databases
{
  "action": "accept",
  "src": ["tag:backend"],
  "dst": ["tag:database:5432"]
}

The database is never exposed to the public internet. Only tagged backend services can connect, and only on port 5432.

Stay Updated

Get weekly IT automation tips

Docker, Ansible, Terraform, MLOps — curated insights delivered to your inbox. No spam.

Subscribe Free →

Subnet Router

Access entire networks through a single Tailscale node:

bash
# On a node in the target network
tailscale up --advertise-routes=10.0.0.0/24,192.168.1.0/24

# Approve in admin console
# Now all tailnet devices can reach 10.0.0.0/24

Access on-premises networks from anywhere without a traditional VPN concentrator.

Tailscale vs Traditional VPN

FeatureTailscaleTraditional VPN
ArchitectureMesh (peer-to-peer)Hub-and-spoke
EncryptionWireGuardIPSec/OpenVPN
Access controlPer-device, per-portNetwork-level
NAT traversalAutomaticComplex
SetupMinutesHours/days
PerformanceDirect connectionsAll traffic through VPN server
SSO integrationBuilt-in (OIDC)Separate config

When to Use Tailscale

Good fit: - Remote access to servers and databases - Connecting cloud and on-premises networks - Zero trust access to Kubernetes clusters - Replacing traditional VPNs - Dev environments accessing shared resources

Not suited for: - High-bandwidth data transfer between data centers (use dedicated links) - Environments requiring FIPS-validated encryption - Organizations that need full network inspection (DPI)

---

Ready to go deeper? Master networking and security with hands-on courses at CopyPasteLearn.

Ready to learn by doing?

Stop reading tutorials — start building. Expert video courses with hands-on labs in real sandboxed environments.

Share this article
LB
Luca Berton

Docker Captain, IT automation expert, Red Hat Summit & KubeCon speaker. Building hands-on education for DevOps engineers at CopyPasteLearn.

Related Articles

Explore topics

Browse more articles on the topics covered here.