Expose cluster workloads to your tailnet with Ingress
Last validated:
Cluster ingress lets you expose cluster workloads to your tailnet, making them accessible to other devices on your Tailscale network. The operator deploys ingress proxy Pods that forward traffic to backend Services.
You can expose Kubernetes Services to your tailnet at two different layers:
- Layer 7 (HTTP/HTTPS) for exposing web applications and APIs.
- Layer 3 (TCP/UDP) for exposing services like databases or message queues.
At either layer, you can run ingress in standalone mode using a single proxy pod, or in high availability mode using a ProxyGroup with multiple replicas. Tailscale recommends high availability mode for production use cases.
This page explains the ingress architecture for both layers, proxy modes, and TLS certificate provisioning.
Ingress does not expose services to the public internet by default. For more information, refer to Expose a Cluster Workload to the Internet.
Standalone layer 7 ingress for HTTP and HTTPS
Layer 7 Ingress lets you expose web applications and APIs.
You configure this with an Ingress object with ingressClassName: tailscale. The proxy uses Tailscale Serve to accept traffic.
On creation of an Ingress, the operator:
- Creates a (combined) config and state
Secret. - Creates an ingress proxy
Pod(single replicaStatefulSet) that forwards traffic, letting devices anywhere on the tailnet access theIngress. - Automatically provisions a secure MagicDNS name with a valid TLS certificate for each Ingress.
L7 Ingress can also be used with High availability configuration.
For more information about exposing a layer 7 workload, refer to Expose a cluster workload to your tailnet at layer 7.
Standalone layer 3 ingress for TCP/UDP
You can use Layer 3 ingress to expose services like databases or message queues.
You configure this with a Service object that selects the application's pods, using either:
- The annotation
tailscale.com/expose: "true". .spec.typeset toLoadBalancerand.spec.loadBalancerClassset totailscale.
The operator creates:
- A combined config and state
Secret. - An ingress proxy
Podusing a single replicaStatefulSetthat forwards traffic, letting devices anywhere on the tailnet access theService.
This Pod uses iptables or nftables rules to DNAT traffic bound for the proxy's tailnet IP address to the Service's internal cluster IP address instead.
You can use L3 Ingress with high availability configuration, and on new or existing Services.
For more information about exposing a layer 3 workload, refer to Expose a cluster workload to your tailnet at layer 3.
High availability (HA) ingress
A high availability L7 or L3 Ingress is similar to the standalone variant, but uses a ProxyGroup to deploy multiple replicas. This lets you:
- Expose a Kubernetes
ServiceorIngressresource to your tailnet through multiple active ingress proxies, to prevent downtime during proxyPodrestarts. - Expose many
ServiceandIngressresources to your tailnet using a smaller number of proxyPods.
You configure HA by adding a tailscale.com/proxy-group annotation to the Ingress or Service.
On creation of an Ingress or Service, the operator:
- Configures a config
Secretper replica. - Configures a
ConfigMapwith either Tailscale Serve config (L7) oriptables/nftablesDNAT rules (L3). - Configures the
IngressProxyGroup, which forwards traffic, letting devices anywhere on the tailnet access theServiceyourIngresspoints to. - Creates a Tailscale Service for the
Ingress ProxyGroup.
To get started with Ingress in HA mode, refer to the L7 or L3 setup guides linked above. Ingress ProxyGroup pods require additional permissions.
TLS certificates and limits
The operator provisions certificates from Let's Encrypt automatically.
Rate limits
- 50 certificates per week: Unique hostnames per tailnet.
- 5 duplicate certificates per week: Hostnames across different clusters.
Test with staging
To avoid limits during testing, use the Let's Encrypt staging environment through a ProxyClass:
apiVersion: tailscale.com/v1alpha1
kind: ProxyClass
metadata:
name: letsencrypt-staging
spec:
useLetsEncryptStagingEnvironment: true
When using a ProxyGroup, the -0 Pod is always the replica that issues a certificate from Let's Encrypt.
Further exploration
- Expose a Kubernetes workload to the public internet with Tailscale Funnel in Expose a Kubernetes cluster workload to the public internet using Tailscale Funnel.
- Configure ingress across multiple Kubernetes clusters with Configure multi-cluster ingress with regional routing.
- Enable communication between services running in different Kubernetes clusters with Connect services across clusters.
- Deploy the Tailscale Kubernetes Operator in IPv6 environments with IPv6 support for the Tailscale Kubernetes Operator.