Overview
Tailscale provides secure VPN access to the Kubernetes cluster and its services. The Tailscale operator manages subnet routing and service exposure, allowing authorized devices to access cluster resources remotely without complex firewall configurations.HelmRelease Configuration
Tailscale is deployed using the Tailscale operator Helm chart:overlays/base/tailscale/helmrelease.yaml
Tailscale operator version 1.92.4 is installed from the official Tailscale Helm repository.
Subnet Router Configuration
The cluster uses a Tailscale Connector resource to advertise subnet routes:overlays/kimawesome/infrastructure/vpn/router/router.yaml
Advertised Routes
Local network range containing cluster nodes and services
Specific host IP for targeted access
Service Exposure
Services can be exposed via Tailscale using service annotations:overlays/kimawesome/applications/dns-server/tailscale-service.yaml
Setting
loadBalancerClass: tailscale directs the LoadBalancer to use Tailscale instead of MetalLB, making the service accessible only to authorized Tailscale network members.Authentication
The Tailscale operator requires authentication credentials stored in a Kubernetes secret:Create OAuth Client
Generate OAuth credentials in the Tailscale admin console under Settings → OAuth clients
Access Control
Tailscale provides several access control mechanisms:ACL Tags
Tag the subnet router to control which Tailscale users can access it:Service-Level Access
Control access to individual exposed services using Tailscale ACLs referencing service hostnames.Verification
Verify Routes in Tailscale
Check the Tailscale admin console to confirm subnet routes are visible and approved
Use Cases
Remote Administration
Access kubectl, SSH, and cluster services from anywhere securely
Service Exposure
Expose services to authorized users without public internet exposure
Multi-Site Access
Connect multiple sites or home labs securely
Developer Access
Allow developers to access development services remotely
Troubleshooting
Connector not advertising routes
Connector not advertising routes
Check the Connector resource status:Common issues:
- OAuth credentials are incorrect or expired
- Routes need to be manually approved in Tailscale admin console
- Subnet router needs IP forwarding enabled on the node
Service not accessible via Tailscale
Service not accessible via Tailscale
Verify the service has the correct annotations:Check that
tailscale.com/expose: "true" is set and loadBalancerClass: tailscale is configured.Operator pods crash looping
Operator pods crash looping
Check operator logs:Common causes:
- Missing or invalid OAuth secret
- Insufficient RBAC permissions
- Network policy blocking operator communication
Security Considerations
Best Practices
Configuration Reference
Connector Spec
Configuration for advertising subnet routes to the Tailscale network
Service Annotations
Set to
"true" to expose the service via TailscaleOptional custom hostname for the exposed service (defaults to service name)
Comma-separated list of ACL tags to apply to the service
Related Resources
Sealed Secrets
Learn how to encrypt OAuth credentials for Git storage
Networking
Understand cluster networking with Cilium
Load Balancer
Learn about MetalLB for public service exposure
DNS Server
See how DNS is exposed via Tailscale