{"id":27653,"date":"2020-12-21T11:59:25","date_gmt":"2020-12-21T11:59:25","guid":{"rendered":"https:\/\/www.testpreptraining.com\/tutorial\/?page_id=27653"},"modified":"2020-12-21T11:59:26","modified_gmt":"2020-12-21T11:59:26","slug":"create-a-public-load-balancer-to-load-balance-vms","status":"publish","type":"page","link":"https:\/\/www.testpreptraining.ai\/tutorial\/create-a-public-load-balancer-to-load-balance-vms\/","title":{"rendered":"Create a public load balancer to load balance VMs"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.testpreptraining.ai\/tutorial\/exam-az-104-microsoft-azure-administrator-associate\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Go back to Tutorial<\/strong><\/a><\/p>\n\n\n\n<p>In this we will get started with Azure Load Balancer by using Azure PowerShell to create a public load balancer and three virtual machines.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Create a resource group<\/strong><\/h4>\n\n\n\n<p>An Azure resource group is a logical container into which Azure resources are deployed and managed.<\/p>\n\n\n\n<p>However, <strong>Create a resource group with New-AzResourceGroup:<\/strong><\/p>\n\n\n\n<p><strong>Azure PowerShell:<\/strong><br><em>New-AzResourceGroup -Name &#8216;CreatePubLBQS-rg&#8217; -Location &#8216;eastus&#8217;<\/em><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Create a public IP address &#8211; Standard<\/strong><\/h4>\n\n\n\n<p>Use New-AzPublicIpAddress to create a public IP address.<\/p>\n\n\n\n<p><strong>Azure PowerShell:<\/strong><br><em>$publicip = @{<br>Name = &#8216;myPublicIP&#8217;<br>ResourceGroupName = &#8216;CreatePubLBQS-rg&#8217;<br>Location = &#8216;eastus&#8217;<br>Sku = &#8216;Standard&#8217;<br>AllocationMethod = &#8216;static&#8217;<br>}<br>New-AzPublicIpAddress @publicip<\/em><\/p>\n\n\n\n<p><strong>Secondly, to create a zonal public IP address in zone 1, use the following command:<\/strong><\/p>\n\n\n\n<p><strong>Azure PowerShell:<\/strong><br><em>$publicip = @{<br>Name = &#8216;myPublicIP&#8217;<br>ResourceGroupName = &#8216;CreatePubLBQS-rg&#8217;<br>Location = &#8216;eastus&#8217;<br>Sku = &#8216;Standard&#8217;<br>AllocationMethod = &#8216;static&#8217;<br>Zone = &#8216;1&#8217;<br>}<br>New-AzPublicIpAddress @publicip<\/em><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Create standard load balancer<\/strong><\/h4>\n\n\n\n<p>This section details how you can create and configure the following components of the load balancer:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Firstly, Create a front-end IP with New-AzLoadBalancerFrontendIpConfig for the frontend IP pool. This IP receives the incoming traffic on the load balancer<\/li><li>Secondly, Create a back-end address pool with New-AzLoadBalancerBackendAddressPoolConfig for traffic sent from the frontend of the load balancer. This pool is where your backend virtual machines are deployed.<\/li><li>Thirdly, Create a health probe with Add-AzLoadBalancerProbeConfig that determines the health of the backend VM instances.<\/li><li>Then, Create a load balancer rule with Add-AzLoadBalancerRuleConfig that defines how traffic is distributed to the VMs.<\/li><li>Lastly, Create a public load balancer with New-AzLoadBalancer.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.testpreptraining.ai\/microsoft-azure-administrator-associate-az-104-free-practice-test\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"117\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/12\/z104-prac-tests-1-750x117.png\" alt=\"AZ-104  practice tests\" class=\"wp-image-27611\" srcset=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/12\/z104-prac-tests-1-750x117.png 750w, https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/12\/z104-prac-tests-1.png 961w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/a><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"configure-virtual-network---standard\"><strong>Configure virtual network &#8211; Standard<\/strong><\/h4>\n\n\n\n<p>Before you deploy VMs and test your load balancer, create the supporting virtual network resources. After that, create a virtual network for the backend virtual machines. Then, create a network security group to define inbound connections to your virtual network.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"create-virtual-network-network-security-group-and-bastion-host\"><strong>Create virtual network, network security group, and bastion host<\/strong><\/h5>\n\n\n\n<ul class=\"wp-block-list\"><li>Firstly, create a virtual network with\u00a0New-AzVirtualNetwork.<\/li><li>Secondly, create a network security group rule with\u00a0New-AzNetworkSecurityRuleConfig.<\/li><li>Then, create an Azure Bastion host with\u00a0New-AzBastion.<\/li><li>Lastly, create a network security group with\u00a0New-AzNetworkSecurityGroup.<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Create outbound rule configuration<\/strong><\/h4>\n\n\n\n<p>Load balancer outbound rules configure outbound source network address translation (SNAT) for VMs in the backend pool.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Create outbound public IP address<\/strong><\/h4>\n\n\n\n<p>Use New-AzPublicIpAddress to create a standard zone redundant public IP address named myPublicIPOutbound.<\/p>\n\n\n\n<p><strong>Azure PowerShell:<\/strong><br><em>$publicipout = @{<br>Name = &#8216;myPublicIPOutbound&#8217;<br>ResourceGroupName = &#8216;CreatePubLBQS-rg&#8217;<br>Location = &#8216;eastus&#8217;<br>Sku = &#8216;Standard&#8217;<br>AllocationMethod = &#8216;static&#8217;<br>}<br>New-AzPublicIpAddress @publicipout<\/em><\/p>\n\n\n\n<p><em>Next, to create a zonal public IP address in zone 1, use the following command:<\/em><\/p>\n\n\n\n<p><strong>Azure PowerShell:<\/strong><br><em>$publicipout = @{<br>Name = &#8216;myPublicIPOutbound&#8217;<br>ResourceGroupName = &#8216;CreatePubLBQS-rg&#8217;<br>Location = &#8216;eastus&#8217;<br>Sku = &#8216;Standard&#8217;<br>AllocationMethod = &#8216;static&#8217;<br>Zone = &#8216;1&#8217;<br>}<br>New-AzPublicIpAddress @publicipout<\/em><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Create outbound configuration<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>Firstly, create a new frontend IP configuration with Add-AzLoadBalancerFrontendIpConfig.<\/li><li>Secondly, create a new outbound pool with Add-AzLoadBalancerBackendAddressPoolConfig.<\/li><li>Thirdly, apply the pool and frontend IP address to the load balancer with Set-AzLoadBalancer.<\/li><li>Lastly, Create a new outbound rule for the outbound backend pool with Add-AzLoadBalancerOutboundRuleConfig.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.testpreptraining.ai\/microsoft-azure-administrator-associate-az-104-online-course\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"117\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/12\/az104-online-course-750x117.png\" alt=\"Create a public load balancer to load balance VMs AZ-104 online course\" class=\"wp-image-27612\" srcset=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/12\/az104-online-course-750x117.png 750w, https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/12\/az104-online-course.png 961w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/a><\/figure><\/div>\n\n\n\n<p><strong>Reference:<\/strong> <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/load-balancer\/quickstart-load-balancer-standard-public-powershell?tabs=option-1-create-load-balancer-standard\" target=\"_blank\" rel=\"noreferrer noopener\">Microsoft Documentation<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/www.testpreptraining.ai\/tutorial\/exam-az-104-microsoft-azure-administrator-associate\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Go back to Tutorial<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Go back to Tutorial In this we will get started with Azure Load Balancer by using Azure PowerShell to create a public load balancer and three virtual machines. Create a resource group An Azure resource group is a logical container into which Azure resources are deployed and managed. However, Create a resource group with New-AzResourceGroup:&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-27653","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Create a public load balancer to load balance VMs<\/title>\n<meta name=\"description\" content=\"Increase your skills by learning about Create a public load balancer to load balance VMs using Microsoft Azure AZ-104 online course Now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.testpreptraining.ai\/tutorial\/create-a-public-load-balancer-to-load-balance-vms\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create a public load balancer to load balance VMs\" \/>\n<meta property=\"og:description\" content=\"Increase your skills by learning about Create a public load balancer to load balance VMs using Microsoft Azure AZ-104 online course Now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/create-a-public-load-balancer-to-load-balance-vms\/\" \/>\n<meta property=\"og:site_name\" content=\"Testprep Training Tutorials\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-21T11:59:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/12\/z104-prac-tests-1-750x117.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/create-a-public-load-balancer-to-load-balance-vms\/\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/create-a-public-load-balancer-to-load-balance-vms\/\",\"name\":\"Create a public load balancer to load balance VMs\",\"isPartOf\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\"},\"datePublished\":\"2020-12-21T11:59:25+00:00\",\"dateModified\":\"2020-12-21T11:59:26+00:00\",\"description\":\"Increase your skills by learning about Create a public load balancer to load balance VMs using Microsoft Azure AZ-104 online course Now!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/create-a-public-load-balancer-to-load-balance-vms\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.testpreptraining.ai\/tutorial\/create-a-public-load-balancer-to-load-balance-vms\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/create-a-public-load-balancer-to-load-balance-vms\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a public load balancer to load balance VMs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"name\":\"Testprep Training Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\",\"name\":\"Testprep Training\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"contentUrl\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"width\":583,\"height\":153,\"caption\":\"Testprep Training\"},\"image\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create a public load balancer to load balance VMs","description":"Increase your skills by learning about Create a public load balancer to load balance VMs using Microsoft Azure AZ-104 online course Now!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.testpreptraining.ai\/tutorial\/create-a-public-load-balancer-to-load-balance-vms\/","og_locale":"en_US","og_type":"article","og_title":"Create a public load balancer to load balance VMs","og_description":"Increase your skills by learning about Create a public load balancer to load balance VMs using Microsoft Azure AZ-104 online course Now!","og_url":"https:\/\/www.testpreptraining.ai\/tutorial\/create-a-public-load-balancer-to-load-balance-vms\/","og_site_name":"Testprep Training Tutorials","article_modified_time":"2020-12-21T11:59:26+00:00","og_image":[{"url":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2020\/12\/z104-prac-tests-1-750x117.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/create-a-public-load-balancer-to-load-balance-vms\/","url":"https:\/\/www.testpreptraining.ai\/tutorial\/create-a-public-load-balancer-to-load-balance-vms\/","name":"Create a public load balancer to load balance VMs","isPartOf":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website"},"datePublished":"2020-12-21T11:59:25+00:00","dateModified":"2020-12-21T11:59:26+00:00","description":"Increase your skills by learning about Create a public load balancer to load balance VMs using Microsoft Azure AZ-104 online course Now!","breadcrumb":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/create-a-public-load-balancer-to-load-balance-vms\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.testpreptraining.ai\/tutorial\/create-a-public-load-balancer-to-load-balance-vms\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/create-a-public-load-balancer-to-load-balance-vms\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.testpreptraining.ai\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Create a public load balancer to load balance VMs"}]},{"@type":"WebSite","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","name":"Testprep Training Tutorials","description":"","publisher":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization","name":"Testprep Training","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","contentUrl":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","width":583,"height":153,"caption":"Testprep Training"},"image":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/27653","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/comments?post=27653"}],"version-history":[{"count":6,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/27653\/revisions"}],"predecessor-version":[{"id":27732,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/27653\/revisions\/27732"}],"wp:attachment":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media?parent=27653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/categories?post=27653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/tags?post=27653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}