Skip to main content

Cloudflare setup

Aucert uses Cloudflare for DNS, secure access (Zero Trust), and edge routing. No public IPs are exposed on Azure.

The Cloudflare Tunnel runs as a pod inside AKS, establishing an outbound-only connection to Cloudflare's edge. No inbound ports are opened on the Azure VNet — this eliminates an entire class of network security concerns.

DNS (aucert.dev)

HostnameTargetProtectionStatus
plane.aucert.devns:internal-platform, svc:planeCloudflare AccessActive
astra.aucert.devns:internal-platform, svc:astraCloudflare AccessActive
docs.aucert.devCloudflare Pages (internal docs)Cloudflare AccessPlanned
docs-preview.aucert.devCloudflare Pages (public docs)PublicPlanned
grafana.aucert.devns:internal-platform, svc:grafanaCloudflare AccessPlanned

Cloudflare Access (Zero Trust)

All *.aucert.dev hostnames are behind Cloudflare Access:

SettingValue
Auth methodGoogle OAuth
Allowed domain@aucert.ai only
Session duration24 hours
Policy typeAllow

How authentication works

  1. User navigates to plane.aucert.dev
  2. Cloudflare Access intercepts the request
  3. User authenticates via Google OAuth
  4. Cloudflare verifies the email ends with @aucert.ai
  5. Cloudflare sets an access token cookie (24h TTL)
  6. Subsequent requests pass through without re-authentication

Tunnel architecture

The Cloudflare Tunnel pod (cloudflared) maintains a persistent outbound connection to Cloudflare's edge network. Key properties:

PropertyDetail
DirectionOutbound only — AKS connects to Cloudflare, not the other way around
ProtocolHTTP/2 with QUIC fallback
No public IPAKS nodes have no public IPs, no inbound NSG rules
RedundancyMultiple tunnel replicas for availability
ConfigurationManaged via Cloudflare dashboard or cloudflared config file

Why no public IP?

Traditional approaches expose a load balancer with a public IP. This requires:

  • NSG rules to restrict inbound traffic
  • DDoS protection
  • SSL termination management
  • Public IP cost

The tunnel approach eliminates all of these. Cloudflare handles SSL, DDoS protection, and WAF at the edge. The only network traffic to AKS is through the tunnel — and only for authenticated requests.

Cloudflare Pages (documentation)

SiteRepository pathDeploy trigger
Public docsdocs/public/Push to main via GitHub Action
Internal docsdocs/internal/Push to main via GitHub Action

Both sites deploy to Cloudflare Pages via wrangler pages deploy in GitHub Actions. Internal docs are additionally protected by Cloudflare Access.

Troubleshooting

Tunnel pod not connecting

Check the cloudflared pod logs:

kubectl logs -n ingress -l app=cloudflared --tail=50

Common causes:

  • Tunnel credentials expired — regenerate in Cloudflare dashboard
  • DNS resolution failure — check CoreDNS logs in AKS
Access returns "You do not have access"

Verify:

  1. Your email domain is @aucert.ai
  2. Your Google account is not in a restricted OU
  3. The Cloudflare Access application policy includes your email domain

What's next