In this part of the lab, you expose the web pages to the internet through a VPC load balancer so that anyone can access them.
-
Create a public load balancer to expose the web application.
- Access the Load balancers for VPC page.
- Click Create.
-
Specify the following settings for the load balancer:
- Load balancer type: Application Load Balancer (ALB)
- Location: Location that you provision your VPC resources
- Details:
- Name:
<your_initials>-web-lb
- Virtual private cloud:
<your_initials>-workload-vpc
- Type:
Public
- DNS type:
Public
- Subnets:
<your_initials>-workload-vsi-zone-1
- Name:
- Backend pool:
- Name:
<your_initials>-backend-pool
- Pool protocol:
HTTP
- Health Port:
80
- Name:
- Click Attach server + in the Back-end pools section and add the VSI that is in the subnet
<your_initials>-workload-vsi-zone-1
with a server port of80
. - Create a front-end listener by clicking Create listener and set the Listener port to
80
. - Under the Security Group section, clear all settings except the one labeled
<your_initials>-workload
. - Click Create load balancer.
-
Allow access to the load balancer by adding the following inbound rule to the security group called
<your_initials>-workload
that the load balancer is attached. -
Allow internet access to the load balancer by adding the following rules to the Access control list for the ACL
<your_initials>-workload-acl
.ℹ️ Tip: It can take several minutes for your load balancer to provision. Wait until the status is set to
Active
in Load balancers for VPC. You might need to refresh the page periodically. -
Complete these steps after your web application is exposed:
-
Retrieve the FQDN of your load balancer:
- Access the Load Balancer list and click your provisioned load balancer.
- Copy the value under
Hostname
.
-
On your computer, open a web browser and point it to
http://<hostname of your load balancer>
. You can also test connectivity by issuing the following curl command:curl http://<Hostname of your load balancer>
-