Skip to content
AnchrasDocumentation
Browse documentation

Networking / User guide

Load balancers

Route application traffic and public exposure through Funnel, tailnet, edge ingress, or provider-backed load balancers.

On this page

Route application traffic to healthy backends over your tailnet, through edge ingress, or through a provider-backed cloud load balancer. LoadBalancerService is the successor to the retired EdgeService.

Before you begin

Connect a supported provider or tailnet and have reachable backend targets. Prepare listener ports, health-check behavior, and DNS/TLS requirements. The tailnet variant publishes a Tailscale Service tagged tag:anchras-lb, hosted by the backend devices' Anchras agents. On a Tailscale tailnet, the tailnet policy must define that tag in tagOwners, and each host must be approved: add "autoApprovers": {"services": {"tag:anchras-lb": ["tag:agent"]}}, or approve the host on the Services page of the Tailscale admin console. Until then the balancer stays in provisioning and names the host it is waiting for. On an Anchras Network tailnet, no policy edit is needed: Anchras declares tag:anchras-lb itself and approves the agents as its hosts. The backend application listens on loopback at the balancer's port. Headscale implements neither Tailscale Services nor their host approval, so a tailnet load balancer is refused on a Headscale tailnet; use cloud_lb there.

Public exposure of a cluster workload through Tailscale Funnel is a deployment setting, not a load-balancer variant: see Catalog and deployments and anchras deploy funnel.

Get started

  1. Open Load balancers in the dashboard, or use anchras lb.
  2. Create a balancer. Variants are tailnet, edge_ingress, and cloud_lb. anchras lb resolve recommends a variant from exposure, protocol, and backends; public exposure of tailnet devices is not offered, so use cloud_lb with instance backends.
  3. Attach backends (instance:<id>, tailnet_device:<id>, or cluster_service:<cluster-id>/<service>), then DNS and TLS as required.
  4. Send a test request through the published endpoint before updating application DNS. For a catalog deployment on the tailnet, anchras deploy funnel <id> --enable toggles Funnel without creating a load balancer.

The former /docs/services/edge guide permanently redirects here.

Operate the service

Monitor health checks and remove unhealthy or retired backends. Verify routing after target changes. Keep DNS and certificate configuration aligned with public listener names. Remove dependent records and review provider deletion results when retiring the balancer. Retire public listeners when the application is removed.

Availability and limits

Provider features and protocols differ. Hetzner has verified provisioning and TCP data-plane coverage for cloud_lb, which is the variant the general-availability label covers. The Tailscale tailnet variant is experimental: Service advertisement and host approval are implemented, while live routing, restart, and cleanup proof is pending (ADA-1514). The funnel variant is retired because Tailscale does not support Funnel on Services; it can no longer be created, and existing funnel balancers can only be inspected and deleted. The CLI warns and the dashboard marks both. A provisioned balancer cannot serve traffic if its backends are unreachable or listening on different ports. Exposure changes reachability; it does not add authentication to an otherwise unauthenticated application. Available modes depend on the configured provider and tailnet.

Troubleshooting

For unhealthy backends, inspect the health-check protocol, path, port, firewall rules, and application listener. For endpoint failures, verify DNS and TLS separately from backend health. For deployment Funnel, confirm the ACL still grants funnel to tag:k8s (the Kubernetes operator's proxies) and that the private endpoint remains on while enabling public exposure.

Next steps

Use the CLI guide to automate repeatable work, or the API guide to integrate Anchras with your own tools.

CLI commands

Install and authenticate using the CLI guide. The table describes command families; required arguments are shown in their usage output.

CommandPurpose
lb list / getList load balancers in one project, or show one. List filters: --project, --variant (tailnet, edge_ingress, cloud_lb, or the retired funnel), --exposure, --search (name or DNS name substring).
lb resolveRecommend a variant from --exposure, --protocol, and repeatable --backend kind:ref.
lb create / deleteCreate or request deletion. Create takes --name, --exposure, --protocol, --port, optional --variant, --backend, --project (the project the balancer lives in), and cloud-account flags for cloud_lb. Every instance and cluster_service backend must be in the balancer's project (a tailnet_device is organization-level and always allowed); a backend in another project is refused with failed_precondition naming it, on create and backend add alike. Public listeners require --public-acknowledged. --accept-app-caps (comma-separated or repeatable, e.g. example.com/cap/monitoring) names the app capabilities a tailnet http/https balancer's Service forwards to its backends in the Tailscale-App-Capabilities header, as tailscale serve --accept-app-caps does; it is set at create and shown by get. --variant funnel is refused: the variant is retired (Funnel is not supported on Tailscale Services); use deploy funnel for cluster workloads. Existing funnel balancers can still be deleted.
lb update <id>Edit a balancer's labels (UpdateLoadBalancer), the only field that changes in place. Repeatable --label key=value replaces the full label set; --clear-labels removes every label. Supports structured output.
lb backend / dns / tls / policyManage backends, DNS records, TLS attachments, and org policy on a balancer (--lb). Backends, DNS records and TLS attachments belong to the balancer's project; the policy is organization-wide. A tailnet_device backend whose host is re-enrolling has no tailnet device until the instance's next one binds it: lb backend list shows its target as waiting for instance <instance-id>, and structured output carries the instance in tailnet_instance_id with an empty tailnet_device_id.

API reference

Browse procedures, request and response types, and download the complete OpenAPI contract.