You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/load-balancer/tutorial-load-balancer-standard-public-zonal-portal.md
+7-304Lines changed: 7 additions & 304 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ author: mbender-ms
7
7
# Customer intent: As an IT administrator, I want to create a load balancer that load balances incoming internet traffic to virtual machines within a specific zone in a region.
8
8
ms.service: load-balancer
9
9
ms.topic: tutorial
10
-
ms.date: 12/05/2022
10
+
ms.date: 12/04/2023
11
11
ms.author: mbender
12
12
ms.custom: template-tutorial, seodec18
13
13
---
@@ -36,316 +36,19 @@ For more information about availability zones and a standard load balancer, see
36
36
37
37
Sign in to the [Azure portal](https://portal.azure.com).
In this section, you'll create a NAT gateway for outbound internet access for resources in the virtual network.
100
-
101
-
1. In the search box at the top of the portal, enter **NAT gateway**. Select **NAT gateways** in the search results.
102
-
103
-
2. In **NAT gateways**, select **+ Create**.
104
-
105
-
3. In **Create network address translation (NAT) gateway**, enter or select the following information:
106
-
107
-
| Setting | Value |
108
-
| ------- | ----- |
109
-
|**Project details**||
110
-
| Subscription | Select your subscription. |
111
-
| Resource group | Select **CreateZonalLBTutorial-rg**. |
112
-
|**Instance details**||
113
-
| NAT gateway name | Enter **myNATgateway**. |
114
-
| Availability zone | Select **1**. |
115
-
| Idle timeout (minutes) | Enter **15**. |
116
-
117
-
4. Select the **Outbound IP** tab or select the **Next: Outbound IP** button at the bottom of the page.
118
-
119
-
5. In **Outbound IP**, for **Public IP addresses**, select **Create a new public IP address**.
120
-
121
-
6. On the **Add a public IP address** page, for **Name**, enter **myNATGatewayIP**.
122
-
123
-
7. Select **OK**.
124
-
125
-
8. Select the **Subnet** tab or select the **Next: Subnet** button at the bottom of the page.
126
-
127
-
9. On the **Subnet** page, for **Virtual network**, select **myVNet** from the dropdown.
128
-
129
-
10. For **Subnet name**, select **myBackendSubnet**.
130
-
131
-
11. Select the **Review + create** button at the bottom of the page, or select the **Review + create** tab.
132
-
133
-
12. Select **Create**.
134
-
135
-
## Create load balancer
136
-
137
-
In this section, you'll create a zonal load balancer that load balances virtual machines.
138
-
139
-
During the creation of the load balancer, you'll configure:
140
-
141
-
* Frontend IP address
142
-
* Backend pool
143
-
* Inbound load-balancing rules
144
-
145
-
1. In the search box at the top of the portal, enter **Load balancer**. Select **Load balancers** in the search results.
146
-
147
-
2. In the **Load balancer** page, select **Create**.
148
-
149
-
3. In the **Basics** tab of the **Create load balancer** page, enter or select the following information:
150
-
151
-
| Setting | Value |
152
-
| --- | --- |
153
-
|**Project details**||
154
-
| Subscription | Select your subscription. |
155
-
| Resource group | Select **CreateZonalLBTutorial-rg**. |
156
-
|**Instance details**||
157
-
| Name | Enter **myLoadBalancer**|
158
-
| Region | Select **(Europe) West Europe**. |
159
-
| SKU | Leave the default **Standard**. |
160
-
| Type | Select **Public**. |
161
-
| Tier | Leave the default **Regional**. |
162
-
163
-
4. Select **Next: Frontend IP configuration** at the bottom of the page.
164
-
165
-
5. In **Frontend IP configuration**, select **+ Add a frontend IP configuration**.
166
-
167
-
6. For **Name**, type **LoadBalancerFrontend**.
168
-
169
-
7. For **IP version**, select either **IPv4** or **IPv6**.
170
-
171
-
> [!NOTE]
172
-
> IPv6 isn't currently supported with Routing Preference or Cross-region load-balancing (Global Tier).
173
-
174
-
8. For **IP type**, select **IP address**.
175
-
176
-
> [!NOTE]
177
-
> For more information on IP prefixes, see [Azure Public IP address prefix](../virtual-network/ip-services/public-ip-address-prefix.md).
178
-
179
-
9. For **Public IP address**, select **Create new**.
180
-
181
-
10. On the **Add a public IP address** page, for **Name**, enter **myPublicIP**.
182
-
183
-
11. For **Availability zone**, select **1** from the dropdown, then click **OK** to close the **Add a public IP address** page.
184
-
185
-
> [!NOTE]
186
-
> In regions with [Availability Zones](../availability-zones/az-overview.md?toc=%2fazure%2fvirtual-network%2ftoc.json#availability-zones), you have the option to select no-zone (default option), a specific zone, or zone-redundant. The choice will depend on your specific domain failure requirements. In regions without Availability Zones, this field won't appear. </br> For more information on availability zones, see [Availability zones overview](../availability-zones/az-overview.md).
187
-
188
-
12. If you see **Routing preference** settings, leave the default of **Microsoft Network** for **Routing preference**.
189
-
190
-
13. Select **OK**.
191
-
192
-
14. Select **Add**.
193
-
194
-
15. At the bottom of the page, select **Next: Backend pools**.
195
-
196
-
16. On the **Backend pools** page, select **+ Add a backend pool**.
197
-
198
-
17. On the **Add backend pool** page, for **Name**, type **myBackendPool**.
199
-
200
-
18. For **Virtual network**, select **myVNet** from the dropdown.
201
-
202
-
19. For **Backend Pool Configuration**, select either **NIC** or **IP Address**.
203
-
204
-
20. Select **Save**.
205
-
206
-
21. At the bottom of the page, select the **Next: Inbound rules** button.
207
-
208
-
22. On the **Inbound rules** page, for **Load balancing rule**, select **+ Add a load balancing rule**.
209
-
210
-
23. On the **Add load balancing rule** page, enter or select the following information:
211
-
212
-
| Setting | Value |
213
-
| ------- | ----- |
214
-
| Name | Enter **myHTTPRule**|
215
-
| IP Version | Select **IPv4** or **IPv6** depending on your requirements. |
216
-
| Frontend IP address | Select **LoadBalancerFrontend**. |
217
-
| Backend pool | Select **myBackendPool**. |
218
-
| Protocol | Select **TCP**. |
219
-
| Port | Enter **80**. |
220
-
| Backend port | Enter **80**. |
221
-
| Health probe | Select **Create new**. </br> In **Name**, enter **myHealthProbe**. </br> Select **HTTP** in **Protocol**. </br> Leave the rest of the defaults, and select **OK**. |
222
-
| Session persistence | Select **None**. |
223
-
| Idle timeout (minutes) | Enter or select **15**. |
224
-
| TCP reset | Select **Enabled**. |
225
-
| Floating IP | Select **Disabled**. |
226
-
| Outbound source network address translation (SNAT) | Leave the default of **(Recommended) Use outbound rules to provide backend pool members access to the internet.**|
227
-
228
-
24. Select **Add**.
229
-
230
-
25. At the bottom of the page, select the **Review + create** button.
231
-
232
-
26. Select **Create**.
233
-
234
-
> [!NOTE]
235
-
> In this example we created a NAT gateway to provide outbound Internet access. The outbound rules tab in the configuration is bypassed as it's optional isn't needed with the NAT gateway. For more information on Azure NAT gateway, see [What is Azure Virtual Network NAT?](../virtual-network/nat-gateway/nat-overview.md)
236
-
> For more information about outbound connections in Azure, see [Source Network Address Translation (SNAT) for outbound connections](../load-balancer/load-balancer-outbound-connections.md)
237
-
238
-
## Create virtual machines
239
-
240
-
In this section, you'll create three VMs (**myVM1**, **myVM2**, and **myVM3**) in one zone (**Zone 1**).
241
-
242
-
These VMs are added to the backend pool of the load balancer that was created earlier.
243
-
244
-
1. On the upper-left side of the portal, select **Create a resource** > **Compute** > **Virtual machine**.
245
-
246
-
2. In **Create a virtual machine**, type or select the values in the **Basics** tab:
| Image | Select **Windows Server 2019 Datacenter - Gen1**|
259
-
| Azure Spot instance | Leave the default of unchecked. |
260
-
| Size | Choose VM size or take default setting |
261
-
|**Administrator account**||
262
-
| Username | Enter a username |
263
-
| Password | Enter a password |
264
-
| Confirm password | Reenter password |
265
-
|**Inbound port rules**||
266
-
| Public inbound ports | Select **None**|
267
-
268
-
3. Select the **Networking** tab, or select **Next: Disks**, then **Next: Networking**.
269
-
270
-
4. In the Networking tab, select or enter:
271
-
272
-
| Setting | Value |
273
-
|-|-|
274
-
|**Network interface**||
275
-
| Virtual network |**myVNet**|
276
-
| Subnet |**myBackendSubnet**|
277
-
| Public IP | Select **None**. |
278
-
| NIC network security group | Select **Advanced**|
279
-
| Configure network security group | Select **Create new**. </br> In the **Create network security group**, enter **myNSG** in **Name**. </br> Under **Inbound rules**, select **+Add an inbound rule**. </br> Under **Service**, select **HTTP**. </br> Under **Priority**, enter **100**. </br> In **Name**, enter **myNSGRule** </br> Select **Add** </br> Select **OK**|
280
-
|**Load balancing**|
281
-
| Place this virtual machine behind an existing load-balancing solution? | Select the check box. |
1. Select **All services** in the left-hand menu, select **All resources**, and then from the resources list, select **myVM1** that is located in the **CreateZonalLBTutorial-rg** resource group.
304
-
305
-
2. On the **Overview** page, select **Connect**, then **Bastion**.
306
-
307
-
3. Select **Use Bastion**.
308
-
309
-
4. Enter the username and password entered during VM creation.
310
-
311
-
5. Select **Connect**.
312
-
313
-
6. On the server desktop, navigate to **Windows Administrative Tools** > **Windows PowerShell**.
314
-
315
-
7. In the PowerShell Window, run the following commands to:
316
-
317
-
* Install the IIS server
318
-
* Remove the default iisstart.htm file
319
-
* Add a new iisstart.htm file that displays the name of the VM:
Add-Content -Path "C:\inetpub\wwwroot\iisstart.htm" -Value $("Hello World from " + $env:computername)
330
-
```
331
-
332
-
8. Close the Bastion session with **myVM1**.
333
-
334
-
9. Repeat steps 1 to 8 to install IIS and the updated iisstart.htm file on **myVM2** and **myVM3**.
335
-
336
-
## Test the load balancer
337
-
338
-
1. In the search box at the top of the page, enter **Load balancer**. Select **Load balancers** in the search results.
339
-
340
-
2. Click the load balancer you created, **myLoadBalancer**. On the **Frontend IP configuration** page for your load balancer, locate the public **IP address**.
341
-
342
-
3. Copy the public IP address, and then paste it into the address bar of your browser. The custom VM page of the IIS Web server is displayed in the browser.
343
-
344
-
:::image type="content" source="./media/tutorial-load-balancer-standard-zonal-portal/load-balancer-test.png" alt-text="Screenshot of load balancer test":::
When no longer needed, delete the resource group, loadbalancer, and all related resources. To do so, select the resource group **CreateZonalLBTutorial-rg** that contains the resources and then select **Delete**.
When no longer needed, delete the resource group, load balancer, and all related resources. To do so, select the resource group **load-balancer-rg** that contains the resources and then select **Delete**.
0 commit comments