{
    "id": "feddab88-2fdf-4d39-803a-575ad124b39c",
    "name": "Configure an Azure Load Balancer",
    "slug": "configure-an-azure-load-balancer",
    "status": "published",
    "lab_type": "pta",
    "is_sample": false,
    "duration_in_seconds": 1800,
    "metadata": {
        "courses": [
            "26f9ad91-c452-41bd-87ea-284a1e3de3f3",
            "9d8d4179-9915-4895-95e6-178f7ca69436",
            "6ebab230-9dc9-4ce8-b913-9d0272210bbe"
        ],
        "pta_sdn": "320",
        "pta_namespace": "my.ine",
        "learning_paths": [],
        "has_published_parent": true
    },
    "session": null,
    "company": "a491bc32-c056-4946-9169-cc053387bada",
    "created": "2022-09-10T22:09:35.856265Z",
    "modified": "2023-10-03T18:59:12.257054Z",
    "is_beta": false,
    "lab_objectives": [],
    "main_learning_area": "d3f82c70-f4e7-428e-afd7-4b1d28988e18",
    "learning_areas": [
        {
            "id": "d3f82c70-f4e7-428e-afd7-4b1d28988e18",
            "name": "Cloud",
            "slug": "cloud"
        }
    ],
    "categories": [],
    "tags": [],
    "difficulty": null,
    "is_web_access": true,
    "is_lab_experience": false,
    "is_featured": false,
    "cve": null,
    "severity": null,
    "year": null,
    "classification": null,
    "is_trackable": false,
    "cpe_credits": null,
    "is_skill_check": false,
    "external_url": "",
    "solution_video": null,
    "explanation_video": null,
    "description": "The goal of this task is to provision an Azure load balancer that serves as a public load balancer for a web app. The web app is hosted on two virtual machines.",
    "description_html": "<p>The goal of this task is to provision an Azure load balancer that serves as a public load balancer for a web app. The web app is hosted on two virtual machines.</p>",
    "tasks": "",
    "tasks_html": "",
    "published_date": "2020-12-10T21:09:05Z",
    "solutions": "# Accessing the lab with pre-requisites\n\nFirst of all login to your azure portal with the generated credentials. You have to accept the terms and click continue to generate the credentials.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/1.png)\n\n**Note:** Your credentials will be different from the one shown in the figure.\n\nAfter logging in to portal using the credentials. If You see a empty resource group, wait for some time for the pre-requisite setup to be deployed.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/2.png)\n\nYou can go to deployments and you will see that pre-requisites are deploying.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/3.png)\n\nAfter a few seconds, deployment will succeed.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/4.png)\n\n\nIf you go to the overview of resource group, you will see some resources are now created.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/5.png)\n\n# Provision and configure a load balancer\n\nFirst of all we will need a public IP address for the load balancer. We can also create it while creating Load balancer. It's totally up to you.\n\n## Provision a public IP address\n\nNow search for Public IP address you will see the service as highlighted in below image. Select this service.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/8.png)\n\nHere click on create to provision a new public IP address in our resource group. You can also see there are two public IPs for the VM already.\n\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/9.png)\n\nHere select the version as IPv4, then name it as **load-balancer-pip**. You can leave DNS label name empty.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/10.png)\n\n**Note:** Don't forget to use the same resource group as of your VM and the same region as of your Virtual Machine.\n\nFinally click on **create**\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/11.png)\n\nIt will take some time to create the public IP address.\n\n## Provision a Load Balancer\n\nAfter the Public IP address is crated, search for load balancers and click on load balancers as highlighted in the image below.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/12.png)\n\nClick on create as highlighted below.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/13.png)\n\nUse the same resource group and then name the load balancer. \n\nAs we want to create a load balancer for the Web Apps that can be accessed over internet.\n\nFor that use the SKU as **Standard** and Type of balancer as **Public**. Then click on **Next**\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/14.png)\n\nHere click on *Add a frontend IP config*\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/15.png)\n\nYou will see something like the image below, give it a name and use the public IP we created earlier.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/16.png)\n\nHere you can see a frontend IP config is added.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/17.png)\n\nClick on **Next**\n\nYou will reach to Backend pools, here click on *Add a backend pool*\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/18.png)\n\nGive it a name and select the virtual network which was created during the initial deployment as highlighted below. Upon selecting you can see that you can now add VM to it. Click on **Add**\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/19.png)\n\nSelect both the VM shown below.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/20.png)\n\nYou can see that it is showing us the private IP config even though we have public IPs on these VMs. Now you can say that the load balancer uses the private network.\n\nAfter adding the VMs you can click on **Add** to add this pool.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/21.png)\n\nBoth the VMs with there virtual network, IP addresses, NIC are shown. Click on **Next**\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/22.png)\n\nIn the Inbound rules, you will see a option to add load balancing rule. Click on that as highlighted below.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/23.png)\n\n* Give this rule a name\n* Use the Frontend IP config we created earlier\n* Use the backend pool we created in previous step\n* Use the ports *80* and *80*.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/24.png)\n\nNow scroll down a bit and you will see and option for health probe. Click on **Create new**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/25.png)\n\n* Give this health probe a name\n* Then choose the protocol as **HTTP**\n\nLet everything else remain same.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/26.png)\n\nAfter creating the health proble you can see that the probe is already selected. Let other config remain same.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/27.png)\n\nIf you are wondering about the other configs, you can learn those from video where this all is explained very well. Click on **Add**\n\nNow you can see that a new load balancing rule is added. \n\nNow we have done everything needed so click on **Review + create**.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/28.png)\n\nAzure will check if everything is fine. After a few second you will see *Validation passed*. Now click on Create to finally deploy the load balancer.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/29.png)\n\nWhen the load balancer is deployed click on **Go to resources**. You will see the IP address for the load balancer. If not click on **See more** in overview.\n\n# Test the load balancer\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/30.png)\n\nUse this IP address at your browser.\n\nRefresh it few times and you can see two different outputs.\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/31.png)\n\n![](https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/32.png)\n\nIf you can see both the outputs, it means you have configured the load balancer properly.\n\n**Note:** Here our web app VMs have public IP addresses so they can be directly accessed on Internet for debugging purposes and also to show you that load balancer use private network to connect to VMs. In a real world scenario do not assign public IP addresses to your services in similar situation.",
    "solutions_html": "<h1>Accessing the lab with pre-requisites</h1>\n<p>First of all login to your azure portal with the generated credentials. You have to accept the terms and click continue to generate the credentials.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/1.png\" /></p>\n<p><strong>Note:</strong> Your credentials will be different from the one shown in the figure.</p>\n<p>After logging in to portal using the credentials. If You see a empty resource group, wait for some time for the pre-requisite setup to be deployed.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/2.png\" /></p>\n<p>You can go to deployments and you will see that pre-requisites are deploying.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/3.png\" /></p>\n<p>After a few seconds, deployment will succeed.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/4.png\" /></p>\n<p>If you go to the overview of resource group, you will see some resources are now created.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/5.png\" /></p>\n<h1>Provision and configure a load balancer</h1>\n<p>First of all we will need a public IP address for the load balancer. We can also create it while creating Load balancer. It's totally up to you.</p>\n<h2>Provision a public IP address</h2>\n<p>Now search for Public IP address you will see the service as highlighted in below image. Select this service.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/8.png\" /></p>\n<p>Here click on create to provision a new public IP address in our resource group. You can also see there are two public IPs for the VM already.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/9.png\" /></p>\n<p>Here select the version as IPv4, then name it as <strong>load-balancer-pip</strong>. You can leave DNS label name empty.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/10.png\" /></p>\n<p><strong>Note:</strong> Don't forget to use the same resource group as of your VM and the same region as of your Virtual Machine.</p>\n<p>Finally click on <strong>create</strong></p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/11.png\" /></p>\n<p>It will take some time to create the public IP address.</p>\n<h2>Provision a Load Balancer</h2>\n<p>After the Public IP address is crated, search for load balancers and click on load balancers as highlighted in the image below.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/12.png\" /></p>\n<p>Click on create as highlighted below.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/13.png\" /></p>\n<p>Use the same resource group and then name the load balancer. </p>\n<p>As we want to create a load balancer for the Web Apps that can be accessed over internet.</p>\n<p>For that use the SKU as <strong>Standard</strong> and Type of balancer as <strong>Public</strong>. Then click on <strong>Next</strong></p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/14.png\" /></p>\n<p>Here click on <em>Add a frontend IP config</em></p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/15.png\" /></p>\n<p>You will see something like the image below, give it a name and use the public IP we created earlier.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/16.png\" /></p>\n<p>Here you can see a frontend IP config is added.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/17.png\" /></p>\n<p>Click on <strong>Next</strong></p>\n<p>You will reach to Backend pools, here click on <em>Add a backend pool</em></p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/18.png\" /></p>\n<p>Give it a name and select the virtual network which was created during the initial deployment as highlighted below. Upon selecting you can see that you can now add VM to it. Click on <strong>Add</strong></p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/19.png\" /></p>\n<p>Select both the VM shown below.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/20.png\" /></p>\n<p>You can see that it is showing us the private IP config even though we have public IPs on these VMs. Now you can say that the load balancer uses the private network.</p>\n<p>After adding the VMs you can click on <strong>Add</strong> to add this pool.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/21.png\" /></p>\n<p>Both the VMs with there virtual network, IP addresses, NIC are shown. Click on <strong>Next</strong></p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/22.png\" /></p>\n<p>In the Inbound rules, you will see a option to add load balancing rule. Click on that as highlighted below.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/23.png\" /></p>\n<ul>\n<li>Give this rule a name</li>\n<li>Use the Frontend IP config we created earlier</li>\n<li>Use the backend pool we created in previous step</li>\n<li>Use the ports <em>80</em> and <em>80</em>.</li>\n</ul>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/24.png\" /></p>\n<p>Now scroll down a bit and you will see and option for health probe. Click on <strong>Create new</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/25.png\" /></p>\n<ul>\n<li>Give this health probe a name</li>\n<li>Then choose the protocol as <strong>HTTP</strong></li>\n</ul>\n<p>Let everything else remain same.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/26.png\" /></p>\n<p>After creating the health proble you can see that the probe is already selected. Let other config remain same.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/27.png\" /></p>\n<p>If you are wondering about the other configs, you can learn those from video where this all is explained very well. Click on <strong>Add</strong></p>\n<p>Now you can see that a new load balancing rule is added. </p>\n<p>Now we have done everything needed so click on <strong>Review + create</strong>.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/28.png\" /></p>\n<p>Azure will check if everything is fine. After a few second you will see <em>Validation passed</em>. Now click on Create to finally deploy the load balancer.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/29.png\" /></p>\n<p>When the load balancer is deployed click on <strong>Go to resources</strong>. You will see the IP address for the load balancer. If not click on <strong>See more</strong> in overview.</p>\n<h1>Test the load balancer</h1>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/30.png\" /></p>\n<p>Use this IP address at your browser.</p>\n<p>Refresh it few times and you can see two different outputs.</p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/31.png\" /></p>\n<p><img alt=\"\" src=\"https://assets.ine.com/content/labs/azure-course-labs/configure-an-azure-load-balancer/32.png\" /></p>\n<p>If you can see both the outputs, it means you have configured the load balancer properly.</p>\n<p><strong>Note:</strong> Here our web app VMs have public IP addresses so they can be directly accessed on Internet for debugging purposes and also to show you that load balancer use private network to connect to VMs. In a real world scenario do not assign public IP addresses to your services in similar situation.</p>",
    "flags": [],
    "min_points_to_pass": null,
    "access_type": "web",
    "user_status": "unstarted",
    "user_lab_status": null,
    "user_status_modified": null,
    "user_flags": [],
    "global_running_session": null
}