Configuring and Securing ACR and AKS

Introduction

This lab walkthrough documents the configuration and security of Azure Container Registry (ACR) and Azure Kubernetes Service (AKS), including role assignments, firewall rules, DNS settings, and validation steps. It demonstrates real-world cloud security practices using Azure CLI, PowerShell, and the Azure Portal.


Step 1: Launch Cloud Shell and Prepare for AKS Deployment

I began by launching Azure Cloud Shell and reviewing the tutorial instructions for deploying AKS and ACR. This step sets the foundation for the lab.

๐Ÿ“ธ Screenshot: Cloud Shell interface showing AKS and ACR deployment tutorial instructions Step 1 โ€“ Cloud Shell and AKS Setup


Step 2: Troubleshoot Deployment Policy Restriction

While deploying the AKS cluster, I encountered a policy error due to location restrictions. Azure Policy blocked the resource creation, which I resolved by selecting an approved region.

๐Ÿ“ธ Screenshot: Azure deployment showing policy restriction error and region selection Step 2 โ€“ Deployment Policy Error


Step 3: View Resource Groups in Azure Portal

I reviewed existing resource groups to confirm the correct environment and subscription context before proceeding with cluster and registry setup.

๐Ÿ“ธ Screenshot: Azure Portal resource groups list showing subscription context and deployment status Step 3 โ€“ Resource Groups Overview


Step 4: Assign AcrPull Role to AKS Identity

To allow AKS to pull images from ACR securely, I assigned the AcrPull role to the clusterโ€™s managed identity using the Azure Portal.

๐Ÿ“ธ Screenshot: IAM role assignment interface showing AcrPull role selection for AKS managed identity Step 4 โ€“ AcrPull Role Assignment


Step 5: Configure Azure Firewall Application Rule

I created an application rule collection named AllowGvn to permit outbound HTTPS access to specific domains like Google and Bing.

๐Ÿ“ธ Screenshot: Azure Firewall rules configuration showing HTTPS application rules for specific domains Step 5 โ€“ Firewall Application Rule


Step 6: Add Network Rule Collection

To control internal traffic, I added a network rule collection that allows UDP traffic between defined IP ranges and ports.

๐Ÿ“ธ Screenshot: Azure Firewall network rules showing UDP traffic configuration between IP ranges Step 6 โ€“ Network Rule Collection


Step 7: Configure Custom DNS Servers

I configured custom DNS servers (Google and Cloudflare) on the nic-firewall network interface to ensure reliable name resolution.

๐Ÿ“ธ Screenshot: Network interface DNS settings showing Google and Cloudflare DNS server configuration Step 7 โ€“ Custom DNS Settings


Step 8: Validate Firewall Rules from Test VM

Using nslookup and curl from the test VM, I validated that outbound traffic was correctly routed through Azure Firewall.

๐Ÿ“ธ Screenshot: Terminal output showing successful nslookup and curl commands validating firewall rules Step 8 โ€“ Firewall Validation from VM


Step 9: Create Virtual Network and Subnets

I created a virtual network named FirewallVNet with three subnets: AzureFirewallSubnet, Workload-SN, and Jump-SN, to segment traffic and enforce security boundaries.

๐Ÿ“ธ Screenshot: Virtual network diagram showing firewall subnet, workload subnet, and jump subnet architecture Step 9 โ€“ VNet and Subnets


Step 10: Test Access to Workload VM

I logged into the workload VM (rsrv-lwrk) via Remote Desktop and confirmed connectivity and profile loading.

๐Ÿ“ธ Screenshot: RDP login to workload VM showing successful authentication and profile service loading Step 10 โ€“ RDP Login to Workload VM


Step 11: Confirm Public IP Routing via Browser

From the VM, I browsed to http://10.0.1.4 and http://10.0.2.4 to test firewall rules. The first succeeded, the second was blocked โ€” confirming rule enforcement.

๐Ÿ“ธ Screenshot: Browser showing successful and blocked access demonstrating firewall rule enforcement Step 11 โ€“ Public IP Validation


Summary

This lab demonstrated secure ACR and AKS configuration with proper role assignments, firewall rules, and DNS settings. All firewall rules and network segmentation were successfully validated.


References