« Phase 13 · Warmup · Track Overview

Hitchhiker's Guide — The Cloud & Infrastructure Backbone

The fast orientation. What the pieces are, what they are called, and how they fit — before the deep dive takes them apart.


Table of Contents


1. Don't panic: the one-paragraph version

Everything here is one idea — reconciliation: read the desired state, observe reality, close the difference. Terraform runs that loop when a human asks; Kubernetes runs it continuously. On top sit three things specific to an AI platform: GPU node pools, which break every autoscaling assumption because a node takes nine minutes to serve and tensor parallelism needs all its GPUs at once; private networking, where the hard part is DNS and where a private endpoint does not close the public path; and policy-as-code at two layers, deny-by-default, failing closed. And the property that ties them together: an infrastructure claim — "no traffic leaves the region" — is only worth anything if you can prove it by searching the topology, not by reading a diagram.

2. The map

   git ──► CI (OIDC, no stored creds) ──► sign + SBOM ──► registry
                                                            │
   ┌────────────────────────────────────────────────────────┴────────────┐
   │  TERRAFORM   graph ──► plan ──► apply ──► state   ◄── drift check   │
   └────────────────────────────────┬────────────────────────────────────┘
                                    ▼
   ┌─────────────────────────────────────────────────────────────────────┐
   │  AKS                                                                 │
   │    admission (Gatekeeper/Kyverno)  ← signed? pinned? limits?         │
   │    ┌────────────┐  ┌────────────┐  ┌──────────────────┐              │
   │    │ CPU pool   │  │ GPU pool   │  │ GPU pool (MIG)   │              │
   │    │ agents,    │  │ tainted,   │  │ 7x10GB slices    │              │
   │    │ gateways   │  │ gang-sched │  │ small models     │              │
   │    └────────────┘  └────────────┘  └──────────────────┘              │
   │    mesh: mTLS, ext_authz, consistent-hash LB                         │
   └────────────────────────────┬────────────────────────────────────────┘
                                │ private endpoints only
   ┌────────────────────────────▼────────────────────────────────────────┐
   │  Azure OpenAI · Key Vault · Storage · Search   (public access OFF)  │
   └─────────────────────────────────────────────────────────────────────┘
             ▲ egress: no default route; a firewall with an FQDN allow-list

3. The vocabulary

TermMeans
Reconciliationdesired vs actual, close the gap. The one idea
Resource graphthe DAG Terraform actually operates on
Statewhat Terraform believes exists — a third thing beside config and reality
Plana diff against state, not against reality
ForceNewan attribute whose change means destroy and recreate
Driftstate and reality disagree
Unmanagedexists, and nothing owns it — the dangerous drift category
Taint / tolerationkeeps non-GPU pods off GPU nodes
Gang schedulingall-or-nothing placement; without it, deadlock
MIGhardware partitioning of one GPU into isolated instances
Warm poolidle nodes kept ready, because cold start is nine minutes
Private endpointa NIC in your subnet mapped to a PaaS service
Private DNS zonethe half that breaks; needs a VNet link
PeeringVNet-to-VNet; directional, and not transitive
UDRuser-defined route; how traffic is forced through a firewall
NSGsubnet/NIC firewall; first-match-by-priority
Service taga named IP set (Storage, AzureCloud) used in NSG rules
Workload identity federationa k8s service-account token exchanged for an Entra token
ext_authzthe mesh filter that calls an external PEP
failure_mode_allowthe ext_authz setting that decides fail-open or fail-shut
Admission controllervalidates/mutates a Kubernetes object before it is stored
Cosign / Notationcontainer image signing
SLSAbuild-provenance framework

4. The four gateways, disambiguated

Everything in this space is called a gateway. They are at different layers:

ThingLayerDoes
APIM / Front Doornorth-southTLS, WAF, rate limit, subscription keys, developer portal
Ingress / mesh gatewaycluster edgeroutes external traffic into the mesh
Envoy sidecareast-westmTLS, retries, timeouts, ext_authz
LLM gatewayapplicationmodel routing, fallback, token accounting, semantic cache

The last one is the one people misplace. It is an application (Phase 04), not network infrastructure, because everything it does requires understanding the content of the request — you cannot count tokens without a tokenizer or cache semantically without an embedding.

5. GPU facts, memorized

FactNumberConsequence
Node start5–8 minreactive autoscaling does not work
Engine warm-up1–3 minditto
Node to serving~9 minwarm pool
Normal node30–60 sthe contrast that makes the point
Cost$3–40/GPU/hridle GPUs are the biggest line item
MIG 1g.10gb7 per GPUmany small models
MIG 7g.80gb1 per GPUi.e. no partitioning
Tensor-parallel gangall-or-nothingVolcano / Kueue
Image size5–20 GBwhich is most of the node start

And the two rules that follow: taint every GPU pool, so nothing else lands there by accident; and place the largest gangs first, because fragmentation defeats a sufficient total.

6. The private-endpoint checklist

Six things, and missing any one leaves a claim false while everything works:

  • The private endpoint exists, in a subnet the workload can route to.
  • A private DNS zone exists (privatelink.<service>.<suffix>).
  • The zone has an A record for the service, pointing at the private IP.
  • The zone is linked to every VNet that needs to resolve it. ← most-missed
  • public_network_access_enabled = false on the service. ← second-most-missed
  • The NSG permits the traffic.

The fourth and fifth are the ones that produce a working system with a false residency claim, and neither is visible in an architecture diagram.

7. The five things that will surprise you

1. A private endpoint does not disable public access. Two settings, two resources. The endpoint adds a route; it removes nothing.

2. terraform plan does not diff against reality. It diffs against state. An empty plan and a wrong estate are entirely compatible, which is why drift detection is a separate scheduled job.

3. Intra-VNet routing is implicit. So "is the private endpoint in my subnet?" is the wrong question — it only has to be somewhere in the VNet. A check that asks the narrow question produces false negatives and gets ignored.

4. NSGs are first-match-by-priority. Unlike the policy engine in Phase 09, where deny always beats allow. Here an allow at priority 100 beats a deny at 200, and the rule set means whatever the numbers say.

5. Mesh retries will double-execute your payments. The mesh does not know which calls are idempotent. Turn retries off for anything side-effecting (Phase 10).

8. Reading a Terraform plan

The two lines that matter in a fifty-resource plan:

  # azurerm_kubernetes_cluster.aks must be replaced
-/+ resource "azurerm_kubernetes_cluster" "aks" {
      ~ location = "uaenorth" -> "uaecentral" # forces replacement   ← STOP
        ...
    }

  # azurerm_storage_account.docs will be updated in-place
  ~ resource "azurerm_storage_account" "docs" {
      ~ public_network_access_enabled = false -> true                ← STOP
    }

# forces replacement means destroy and recreate. For a cluster that is an outage; for a storage account it is data loss. The symbol is -/+, and the guard is prevent_destroy:

lifecycle {
  prevent_destroy = true
}

The second one is not marked as dangerous by Terraform at all — it is an ordinary in-place update that reopens a service to the internet. Which is exactly why the admission gate in the lab exists: the plan cannot tell you that a change is a compliance problem, and a policy check can.

Two other plan-reading habits worth having: run terraform plan -refresh-only periodically to see drift, and read the resource count at the top — a plan that touches forty resources when you changed one line means a variable moved and you should stop.

9. Where the neighbouring phases connect

PhaseGives this phaseTakes from this phase
01 — Kernelsession affinity as a requirementconsistent-hash LB in the mesh
04 — LLM gatewaywhere it sits, and private endpoints to models
05 — Servingthe capacity modelGPU pools, MIG, warm pools
08 — Identityno long-lived secretsmanaged identity, workload identity federation
09 — Control planethe PDPext_authz, admission control
10 — Action gatewayidempotency semanticswhy mesh retries must be off
11 — Guardrailsegress allow-listingthe firewall, and the proof
12 — Integrationconnectivity to the estateprivate endpoints, peering
14 — SRErollback triggered by burn rate
15 — Governanceresidency requirementsthe reachability proof as evidence

10. What to build first

  1. The landing zone and the VNet topology. Everything else assumes it, and changing a VNet's address space later is a migration.
  2. No default route, plus private endpoints. Start at the strictest posture and relax deliberately. "We'll lock down egress later" becomes never, because by then forty things depend on it.
  3. The DNS zones and their VNet links. At the same time as the endpoints, or you will ship the working-but-public configuration and not know.
  4. Workload identity federation, and OIDC in CI. Before any secret is stored, because removing a stored credential means rotating it everywhere it leaked to.
  5. Admission policies, before the first workload. Retrofitting requests/limits across a running fleet is a rolling restart of everything.
  6. The GPU pool with taints, before the first GPU workload.
  7. Drift detection, scheduled, once there is anything to drift from.
  8. The reachability check, before the first residency claim is made to anyone outside the team.