AI, LLM and real-time · AWS · Kubernetes · vLLM

Self-hosted open-weight LLM inference on Kubernetes with GPU nodes and no internet egress

A private inference service running open-weight models with vLLM on EKS GPU nodes: queue-aware autoscaling, a governed model registry, weights loaded from encrypted S3 over a gateway endpoint, and a VPC with no route to the internet.

A reference architecture from EITSAA, not a named client system. Service limits, prices and product features change, so confirm current details before you commit to a design.

  • ACSC Essential Eight
  • Australian Government ISM
  • Protective Security Policy Framework (PSPF)
  • Australian data residency
  • Sydney (ap-southeast-2)

Architecture

Architecture diagram. Tinted boundaries show regions, accounts, networks and trust zones. Numbered arrows match the flow below.
Self-hosted open-weight LLM inference on Kubernetes with GPU nodes and no internet egress architectureAgency apps and gateway to Internal ALB: HTTPS. Internal ALB to Inference gateway: forward. Inference gateway to vLLM pods: route by load. S3 model weights to vLLM pods: load weights. Model registry to S3 model weights: promote. KEDA and Karpenter to vLLM pods: scale. vLLM pods to Prometheus and DCGM metrics: metrics. ECR image registry to vLLM pods: image pullInternal clientsAWS account · ap-southeast-2 · no internet egressVPC · private subnets onlyGPU node pool · 3 AZsAgency apps andgatewayVia Transit GatewayInternal ALBTLS, mTLS optionalInference gatewayAuth, quotas, queue-awareroutingvLLM podsContinuous batching, tensorparallelKEDA and KarpenterScale on queue depth, GPU nodesPrometheus and DCGMmetricsGPU, tokens/s, TTFTModel registryApproved versions, model cardsS3 model weightsSSE-KMS, gateway endpointECR image registrySigned inference images1HTTPS2forward3route by load4load weights5promote6scale7metrics8image pullPlatform servicesAWS IAMAmazonCloudWatchAWS CloudTrailAWS KMS
  • Compute and containers
  • Network and edge
  • AI and ML
  • Messaging, events and workflow
  • Monitoring, audit and analytics
  • Object and file storage
  • Security and identity
  • Request or data flow
  • Asynchronous or optional
  • Boundary: region, account, network or trust zone

Request and data flow

  1. Clients reach an internal Application Load Balancer from agency networks over Direct Connect or Transit Gateway. There is no public listener. TLS terminates at the load balancer, and mutual TLS can be added between the gateway and clients.

  2. The load balancer forwards to the inference gateway, an OpenAI-compatible service that authenticates callers, applies per-team quotas and rejects oversized prompts before they consume GPU time.

  3. The gateway routes to vLLM replicas using queue depth and KV-cache pressure, not round robin. vLLM uses continuous batching and paged attention to keep GPU utilisation high.

  4. At pod start, weights are streamed from S3 through a gateway endpoint (no internet), cached on local NVMe and verified against the checksum recorded in the registry. Startup can take minutes for large models, so readiness gates wait for the load.

  5. Promotion in the model registry copies an approved, scanned and evaluated model to the production weights bucket. Only the pipeline role can write there, and only approved versions are deployed.

  6. KEDA scales replicas on queue depth or tokens per second, and Karpenter provisions or removes GPU nodes. A warm minimum of one replica avoids cold-start latency for interactive use.

  7. vLLM and the NVIDIA DCGM exporter publish time to first token, tokens per second, GPU utilisation, memory and error metrics to Prometheus for dashboards and alerts.

  8. Inference images are built from a pinned base, scanned, signed and pushed to ECR. The VPC reaches ECR through interface and S3 gateway endpoints, so nodes pull images without internet access.

Components and why they were chosen

ComponentWhat it doesWhy this choice
Amazon EKS with managed GPU node groups or Karpenter (p4d, p5, g5, g6 families)Runs GPU workloads with node auto-provisioning.Kubernetes gives scheduling, rollout and autoscaling that bespoke EC2 scripts do not.
vLLM (alternatives: TGI, TensorRT-LLM, SGLang)High-throughput serving with continuous batching and paged KV cache.Strong throughput per GPU dollar and broad open-weight model support.
Inference gateway (Envoy AI Gateway, LiteLLM or a thin custom service)OpenAI-compatible API, quotas and queue-aware routing.Applications are portable between this tier and cloud providers.
Model registry (SageMaker Model Registry, MLflow or a Git-and-bucket convention)Versions, model cards, licence, evaluation evidence and approval state.Makes provenance and approval auditable.
S3 with SSE-KMS and a gateway endpointWeights storage reachable without the internet.Durable, cheap and access-controlled.
KEDA and KarpenterEvent-driven pod scaling and just-in-time GPU node provisioning.GPU capacity follows demand.
NVIDIA GPU Operator and DCGM exporterDrivers, device plugin and GPU telemetry.Standard, supportable GPU stack on Kubernetes.
ECR with image signing (cosign) and scanningControlled, scanned images.Supply-chain integrity for the serving stack.

Design decisions and trade-offs

Self-host or consume a managed model

Self-host only for workloads that need weight control, strict data paths or steady volume that beats per-token pricing.

Why. Managed services remove GPU operations and give access to frontier models.

Trade-off. You own capacity, patching, safety tuning and model quality.

Serving engine

vLLM by default, TensorRT-LLM where a fixed model justifies the engineering effort.

Why. vLLM is easy to operate and fast enough for most workloads.

Trade-off. TensorRT-LLM can be faster on NVIDIA hardware but needs engine builds per model and GPU.

Kubernetes or managed endpoints

EKS for several models and teams, SageMaker endpoints for one or two stable models.

Why. Kubernetes pays off when you share GPUs and platform tooling.

Trade-off. Higher platform skill needs than a managed endpoint.

Parallelism and quantisation

Tensor parallelism across GPUs in a node for large models, and 8-bit or 4-bit quantisation where evaluation shows acceptable quality loss.

Why. Fits bigger models on fewer GPUs and cuts cost.

Trade-off. Quantisation can degrade reasoning and multilingual quality, so run your evaluation set first.

Network isolation

No NAT gateway and no internet route. VPC endpoints only.

Why. Removes exfiltration and dependency-pull risk from the serving plane.

Trade-off. Every dependency (images, weights, packages) must be mirrored internally.

Well-architected pillars

Security

Private subnets with no internet route, VPC endpoints with policies, KMS-encrypted weights, signed images, Pod Security Standards, network policies, IRSA roles per workload and no SSH to nodes.

Reliability

Replicas across three AZs, PodDisruptionBudgets, readiness gates that wait for weights, and a warm minimum replica count. Capacity reservations for critical models.

Performance

Continuous batching, prefix caching, quantisation, right-sized GPU choice and queue-aware routing. Measure time to first token and tokens per second under realistic prompts.

Cost optimisation

GPU hours dominate. Use Savings Plans or capacity reservations for the baseline, Spot for batch jobs only, and scale to zero for non-production.

Operational excellence

GitOps for manifests, canary rollouts of new model versions, load tests per release and runbooks for GPU node failures and out-of-memory events.

Sustainability

Right-size GPUs, quantise where safe, batch offline work into off-peak windows and shut down idle non-production pools.

Network, identity and data

Networking

Private subnets in three AZs with no NAT or internet gateway. Gateway endpoints for S3 and interface endpoints for ECR, STS, CloudWatch Logs, KMS and Secrets Manager. The internal ALB is reachable only from approved agency CIDR ranges. Security groups and Kubernetes NetworkPolicies allow only gateway-to-inference and inference-to-metrics traffic. Multi-GPU models stay within one node to avoid cross-node bandwidth limits.

Identity and least privilege

Pods use IAM Roles for Service Accounts, with the inference role limited to read on one weights prefix. The pipeline role is the only writer. Cluster admin is just-in-time with MFA. Callers use workload identity at the gateway, and per-team API keys, where used, are rotated and scoped.

Data and encryption

Prompts and outputs are transient in the serving pods and are not written to disk. Logs contain metadata only. Weights are licensed assets: record each model's licence terms in the registry and confirm they permit the intended government or commercial use before approval.

Security and compliance mapping

ControlHow this design addresses it
Application controlOnly signed images from the internal ECR are admitted by policy (Kyverno or Gatekeeper). Essential Eight.
Patch applications and operating systemsBottlerocket or AL2023 GPU AMIs refreshed on a schedule and rolled through node groups. Essential Eight.
Restrict administrative privilegesNo node SSH, just-in-time cluster access and scoped IRSA roles. Essential Eight.
Network segmentation and no egressEndpoint-only VPC supports ISM network and gateway guidance.
Data residencyAll compute, storage and keys in ap-southeast-2. Supports PSPF and SA ISMF.

Mappings show how the design supports each control. They are not certifications, and EITSAA does not claim IRAP assessment or compliance for any reference architecture.

Failure modes, targets and scaling

  • Target RTOAbout 1 hour to rebuild the cluster from code. Minutes to reschedule replicas.
  • Target RPONot applicable to stateless inference. Weights and registry state are versioned and replicated.
  • Scaling and limitsThroughput scales with GPU count. Benchmark the specific model, quantisation and prompt mix before promising capacity.
Failure modeMitigation
GPU node failure or Spot reclaimReplicas in multiple AZs, PDBs and automatic node replacement. Do not run interactive models on Spot.
GPU capacity not available at scale-outCapacity reservations or capacity blocks for the baseline, plus a fallback route to a managed provider if policy allows.
Out-of-memory from long contextsEnforce maximum context at the gateway and tune vLLM memory utilisation and maximum sequences.
Bad model promotionEvaluation gate in the registry, canary replica and one-step rollback to the previous version.
Weights bucket unavailable or corruptedVersioned bucket, checksum verification and a cross-account copy of approved weights.

Observability and runbooks

  • Time to first token, inter-token latency, tokens per second and queue depth per model.
  • GPU utilisation, memory and Xid errors from DCGM.
  • Per-team token usage and error rates from the gateway.
  • Synthetic evaluation prompts after each deploy to catch silent quality regressions.

Cost drivers and levers

GPU instance hours, idle warm capacity, S3 and cross-AZ data transfer, and engineering time.

  • Quantise after evaluation.
  • Use the smallest model that passes your evaluation set.
  • Reserve baseline capacity and burst on demand.
  • Schedule non-production to shut down out of hours.

Implementation and fit

Phased approach

  1. Benchmark candidate models and a managed alternative on your own evaluation set.
  2. Build the private VPC, EKS GPU pool and registry with one model.
  3. Add the gateway, autoscaling and observability, then load test.
  4. Harden supply chain controls and add further models through the registry process.

Anti-patterns to avoid

  • Running on a single large GPU instance with no redundancy.
  • Pulling weights from the public internet at start-up.
  • Autoscaling on CPU instead of queue depth.
  • Skipping licence review for model weights.
  • Choosing a model by leaderboard rather than your own tasks.

When to use it

  • Workloads whose data cannot leave the agency account.
  • Steady high volume where per-token pricing exceeds GPU cost.
  • Teams needing custom or fine-tuned open-weight models.

When not to

  • Low or spiky volume, where managed APIs are cheaper and simpler.
  • Needs that depend on frontier-model capability not available as open weights.

More in ai, llm and real-time

Related insights

Discuss this architecture

Tell us your systems, constraints and timeline. We reply within one business day, and the initial conversation is free.