# 7. Create a Load Balancer

Navigate to **Kubernetes** -> **Services**, and select the `nginx` Service from the list.

Select the **Load Balancers** tab and click **Configure Load Balancer**. The **Add Load Balancer Listener** pane displays. Complete the following fields:

* **Type**: `Application LB`
* **Container port**: `80`
* **External port**: `443`
* **Visibility**: `Public`
* **Application mode**: `Docker Mode`
* **Health check**: `/`
* **Backend protocol**: `HTTP`
* **Certificates**: `WILDCARD.test04-apps.duplocloud.net`

<div align="left"><figure><img src="/files/LkcoTm1fgWIn6mbEo0xI" alt=""><figcaption><p>The <strong>Add Load Balancer Listener</strong> pane</p></figcaption></figure></div>

Click **Add**. When the Load Balancer is complete, the Service displays a status of `Running` and the Load Balancer displays a status of `Ready`.

## Enable HTTP to HTTPs Redirect

Navigate to **Kubernetes** -> **Services** and select the `nginx` Service.

Click the **Load Balancers** tab. On the **Other Settings** card, click **Edit.** Enable the **HTTP to HTTPS redirect** option.

<figure><img src="/files/YMdgRnLcy3NU8NPoHJMi" alt=""><figcaption><p>The <strong>DNS Name</strong> and <strong>Other Settings</strong> cards in the <strong>Load Balancers</strong> tab</p></figcaption></figure>

You can find the created **DNS Name** displayed on this page, CNAME'd to your Load Balancer name. Copy the URL in the **DNS Name** card and paste into your browser. You should see the NGINX welcome page "**Welcome to nginx!**" or similar. It may take a few minutes for the application to start.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.duplocloud.com/docs/automation-platform/workshops/duplocloud-101-for-aws/create-your-infrastructure-and-application/6.-create-a-load-balancer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
