Notes from MS Learn AZ-700 Module 4: Load balance non-HTTP(S) traffic in Azure – Unit 4: Create and Configure an Azure Load Balancer
Tasks (taken from MS Learn: Items without “Task” in front of them are personal additions)
- Task 1: Create the virtual network
- Search and Choose Virtual networks in Azure Portal
- Click Create
- Select Resource group from dropdown or create new (create new in this example)
- Enter name for new resource group
- Click OK
- Enter Name under Instance details
- Click Next : IP Addresses
- Delete default IP address space (trash can icon next to 10.0.0.0/16
- Enter new IPv4 address space
- Select Add subnet
- In right panel (add subnet)
- Enter Subnet name for backend subnet
- Enter Subnet address range
- Click Add
- Repeat above for frontend subnet
- Click Next : Security >
- Toggle BastionHost to Enable
- Enter Bastion name
- Enter AzureBastionSubnet address space
- Under Public IP Address select from drop down or Create new (create new in this example)
- Add name to public IP address box
- Select OK
- Select Review + create
- Once Validated click Create
- Click Go to resource
- Task 2: Create backend servers
- Open Azure PowerShell (Shell button next to Azure Portal search bar)
- Upload Template and Parameter files into cloud shell
- View account
- Az account show –output table
- Set subscription in Azure PowerShell
- Az account set –subscription “subscription name from output above”
- Set resource group name variable
- $RGName = “NameOfRG”
- Deploy VM
- New-AzResourceGroupDeployment -ResourceGroupName $RGName -TemplateFile templatefilename.json -TemplateParameterFile filename.parameters.vm1.json
- Repeat above for each filename.parameters.vm#.json
- Task 3: Create the load balancer
- Search and click Load Balancers in Azure Portal
- Click Create
- Select Resource Group from dropdown
- Enter Name under Instance details
- Verify Region, SKU, Type, Tier
- Click Next : Frontend IP configuration
- Click Add a frontend IP configuration
- In right panel enter
- Name
- Select the frontend subnet from the dropdown
- Select add
- In right panel enter
- Click Review + create
- Once validated click Create
- Task 4: Create load balancer resources
- Click Go to resource after above completes
- Click Backend Pools under settings
- Click Add
- Enter backend pool name
- Under IP Configurations click Add
- Check boxes for VMs
- Click Add
- Click Save
- Click Health probes under settings
- Click Add
- Enter Name
- Select HTTP as Protocol from dropdown
- Change interval to 15
- Click Add
- Click Load balancing rules
- Click Add
- Enter name
- Select Frontend IP Address from dropdown
- Select Backend Pool from dropdown
- Enter Port #
- Enter Backend Port #
- Select Health Probe from dropdown
- Adjust Idle timeout (in minutes) via slider (15 in this example)
- Click Add
- Task 5: Test the load balancer
- Search and select Virtual machines in Azure Portal
- Select Create
- Virtual Machine
- Choose resource group from dropdown
- Enter Virtual machine name
- Select Image from dropdown (Windows Server 2019 Datacenter – x64 Gen2) in this example
- Enter Username and Password
- Click Next : Disks >
- Click Next : Networking >
- Choose Public IP from dropdown (none in this example)
- Toggle NIC network security group to Advance (for this example)
- Select group under Configure network security group dropdown
- Click Review + create
- One validation passed click Create
- Virtual Machine
- Navigate to load balancers page via Azure Portal
- Click on load balancer created
- Click see more and copy address
- Navigate to Virtual Machines via Azure Portal
- Open Test VM
- Connect > Bastion
- Enter Username and Password > Connect
- Open IE
- Navigate to IP copied above
- Shows first VM
- Refresh multiple times to verify reaching various backend VMs
- Connect > Bastion