SHART.CLOUD | DESKTOP | LABROULETTE | AZURE-PRIVATE-AKS-INGRESS.YAML
01 - Labroulette - Hide an AKS Cluster Behind a Private Ingress
| shart.cloud / labroulette / azure-private-aks-ingress |
AZURE **O ~110 min $5-12 reviewed 6/29/2026

Hide an AKS Cluster Behind a Private Ingress

Re-platform the app onto a private AKS cluster reachable only through an internal Application Gateway, so nothing — not the API server, not the workloads — answers on a public IP, while the team still deploys via Helm.

#containers#networking#security
Lab Grumblr, a "complaints as a service" startup whose AKS demo cluster got its Kubernetes API and a Grafana pod indexed by Shodan within a week of launch. all labs
02 - Actions
score -- - -- votes
-- completed
State loading
03 - Scenario

Grumblr, a "complaints as a service" startup whose AKS demo cluster got its Kubernetes API and a Grafana pod indexed by Shodan within a week of launch.

Re-platform the app onto a private AKS cluster reachable only through an internal Application Gateway, so nothing — not the API server, not the workloads — answers on a public IP, while the team still deploys via Helm.

Constraints

  • API server must be private — no public FQDN that resolves on the internet
  • Ingress terminates on an internal IP inside the VNet, not a public LB
  • Workload identity over secrets — no service principal passwords in tfvars
  • All infra in Terraform; app delivery via a Helm release in the same apply
Scenario AZURE - intermediate
05 - Steps
  1. STEP_02

    Stand up a private AKS cluster

    Create the AKS cluster with private cluster enabled and the node subnet attached. Confirm the API server FQDN is a private DNS name, not a public one, by checking the cluster's private FQDN output.

    Hint: A private cluster means your apply host has to reach the private API endpoint — run from a jumpbox/self-hosted runner inside the VNet, or peer in.

    Terraform docs

  2. STEP_03

    Give pods an identity, not a password

    Create a user-assigned managed identity and grant it the roles the app needs, then federate it to the cluster's workload identity so a pod can assume it. No secrets land in your state or tfvars.

    Terraform docs

  3. STEP_04

    Internal ingress only

    Deploy an Application Gateway (or AGIC) bound to the ingress subnet with a private frontend IP, so the app's ingress resolves to an in-VNet address. Nothing should land on a public load balancer.

    Terraform docs

  4. STEP_05

    Ship the app with Helm

    Use a Helm release to install the application chart into the cluster, pointing the ingress annotations at the internal gateway. Verify from a VNet-connected host that the service answers and from the open internet that it does not.

    Terraform docs

Steps 5 tasks
06 - Deliverables
  • A Terraform stack that builds the network, private cluster, identity, ingress, and Helm release
  • Proof the API server FQDN is private (dig output) and the app has no public IP
  • A short note on how the pod authenticates without a stored secret
Deliverables 3 required
07 - Rubric
AKS cluster is private with no public API endpoint 30%
Ingress terminates on an internal VNet IP, not a public load balancer 30%
Workload identity is federated and the app uses no stored secrets 25%
Helm release deploys the app cleanly in the same apply 15%
Rubric self-assessed