Private AKS production architecture with controlled egress

Reference architecture: private control plane, private dependencies, controlled egress, and observable delivery flow.

Private AKS architecture showing software supply chain, Azure subscription hub and spoke VNets, Azure Firewall controlled egress, private DNS and private endpoints, workload boundary, shared Azure services, and end-to-end control flow.

Diagram source: curated architecture board for this article.

Executive Context

Enterprise platform teams manage a persistent tension: strict network isolation to protect critical workloads versus the need for high-velocity software delivery. In regulated environments, unrestricted internet egress from Kubernetes clusters often violates compliance mandates. However, overly restrictive network configurations can break cluster operations, image pulls, and telemetry flows, leading to operational instability. This architecture defines a private Azure Kubernetes Service (AKS) cluster that enforces network isolation without compromising platform reliability or engineering speed.

Constraints and Assumptions

The architecture assumes a multi-tenant platform serving multiple engineering teams across development, test, staging, and production environments. The platform must support:

Key assumptions include the use of Azure Private Link for service connectivity, Azure Firewall for egress control, and a hub-and-spoke network topology. The platform operates in public Azure regions, excluding Azure Government or 21Vianet regions due to specific retirement announcements for Defender for Cloud in those environments.

Target Architecture

The target architecture leverages a private AKS cluster where the control plane API server is accessible only via a private endpoint within the customer's virtual network (VNet). This ensures that all traffic between the API server and node pools remains on the private network. The architecture includes:

This design minimizes the attack surface by removing public endpoints and restricting outbound traffic to known, necessary destinations.

DevSecOps Control Model

DevSecOps is treated as an operating model spanning the entire lifecycle of the workload. Controls are implemented at each stage to ensure security and compliance:

This model ensures that security is integrated into the development process, reducing the risk of vulnerabilities and compliance violations.

Key Architecture Decisions

Several key architecture decisions were made to balance security, performance, and operational complexity.

Decision 1: Use Private AKS Cluster with Private DNS Zone

Decision: Deploy the AKS cluster as a private cluster with a private DNS zone linked to the cluster VNet.

Why Chosen: This ensures that the API server is accessible only within the VNet, eliminating public exposure. The private DNS zone allows nodes to resolve the API server FQDN to its private IP address.

Alternative Rejected: Using a public API server with IP-based access restrictions. This was rejected because it exposes the API server to the public internet, increasing the attack surface.

Consequence: The cluster is fully isolated from the public internet. However, it requires careful DNS configuration to ensure that nodes can resolve the API server and private endpoints.

Decision 2: Control Egress via Azure Firewall with FQDN Rules

Decision: Use Azure Firewall to control outbound traffic from the cluster, allowing only specific FQDNs and ports.

Why Chosen: Azure Firewall supports FQDN-based filtering, which is essential for AKS clusters that rely on dynamic IP addresses for many services. This allows for precise control over outbound traffic.

Alternative Rejected: Using Network Security Groups (NSGs) with IP-based rules. This was rejected because AKS dependencies often use dynamic IP addresses, making IP-based rules difficult to maintain.

Consequence: Egress traffic is strictly controlled, reducing the risk of data exfiltration. However, it requires ongoing maintenance of firewall rules to accommodate new dependencies.

Decision 3: Use Private ACR for Image Pulls

Decision: Configure the cluster to pull images from a private Azure Container Registry (ACR) instance connected via a private endpoint.

Why Chosen: This eliminates the need for the cluster to access the public Microsoft Artifact Registry (MAR) for system images. The private ACR can pull images from MAR and serve them via a private endpoint, keeping traffic within the VNet.

Alternative Rejected: Allowing direct egress to MAR. This was rejected because it requires opening outbound access to public endpoints, which contradicts the goal of network isolation.

Consequence: Image pulls are fully isolated from the public internet. However, it requires managing the private ACR and ensuring that it is synchronized with MAR.

Implementation Blueprint

The implementation involves several steps to configure the private AKS cluster, network, and services.

1. Network Configuration

2. AKS Cluster Deployment

3. Private Endpoints

4. Egress Control

Operational Evidence and SLOs

Operational health is monitored through several key indicators:

Service Level Objectives (SLOs) are defined for each of these indicators to ensure that the platform meets the required reliability standards.

Failure Modes and Trade-offs

Several failure modes and trade-offs must be considered:

Adoption Roadmap

The adoption of this architecture can be phased to minimize risk:

  1. Phase 1: Assessment and Planning: Assess the current network and security posture. Define the requirements for private endpoints and egress control.
  2. Phase 2: Pilot Deployment: Deploy a pilot private AKS cluster in a non-production environment. Test the configuration and validate that cluster operations are not impacted.
  3. Phase 3: Production Deployment: Deploy the private AKS cluster in production. Migrate workloads gradually, monitoring for any issues.
  4. Phase 4: Optimization: Optimize the configuration based on operational experience. Fine-tune firewall rules and DNS settings.

Conclusion

Architecting a private AKS cluster with controlled egress and private endpoints is a complex but necessary task for enterprise platforms. By carefully balancing security, performance, and operational complexity, platform teams can deliver a secure and reliable environment for engineering teams. The key is to implement robust DevSecOps controls, monitor operational health, and continuously optimize the configuration based on feedback and experience.

For more details on creating private AKS clusters, see Create a Private Azure Kubernetes Service (AKS) Cluster. For information on controlling egress traffic, see Outbound Network and FQDN Rules for Azure Kubernetes Service (AKS) Clusters. For an overview of private endpoints, see What is a private endpoint?.

Sources

  1. Microsoft Learn source 1
  2. Microsoft Learn source 2
  3. Microsoft Learn source 3