Skip to content

Instantly share code, notes, and snippets.

@0b01
Created September 30, 2025 03:41
Show Gist options
  • Save 0b01/54571570a9510fc8d486351e6624973e to your computer and use it in GitHub Desktop.
Save 0b01/54571570a9510fc8d486351e6624973e to your computer and use it in GitHub Desktop.
Tailscale exit node on Azure Container Apps
# variables
LOC=westus2
RG=rg-aca-tailscale-$LOC
ENV=aca-env-$LOC
APP=aca-ts-exit-$LOC
TS_HOSTNAME=aca-exit-$LOC
TS_AUTHKEY="tskey-auth-xxxxxxxxxxx-xxxxxxxxxxxxxxxxxx"
# resource group
az group create -n $RG -l $LOC
# container apps environment
az containerapp env create -g $RG -n $ENV -l $LOC
az containerapp create \
-g "$RG" -n "$APP" --environment "$ENV" \
--image tailscale/tailscale:latest \
--cpu 0.25 --memory 0.5Gi \
--secrets ts-authkey="$TS_AUTHKEY" \
--env-vars \
TS_AUTHKEY=secretref:ts-authkey \
TS_USERSPACE="true" \
TS_HOSTNAME="$TS_HOSTNAME" \
TS_EXTRA_ARGS="--advertise-exit-node --accept-dns=false" \
TS_TAILSCALED_EXTRA_ARGS="--state=mem:" \
KUBERNETES_SERVICE_HOST=""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment