# How to Create Kubernetes Load Balancer?

To create Kubernetes load balancer, follow the steps given below:

**Step 1:** [Login](https://customer.acecloudhosting.com/index.php?m=ace_product_register_addon\&action=login) to your account.&#x20;

<figure><img src="/files/JGwjk7IwoCdYLJE3pN7T" alt=""><figcaption></figcaption></figure>

**Step 2:** Navigate to **Services** and then click on **My Services.**

<figure><img src="/files/BmUAd7PHKDoX94fhbItG" alt=""><figcaption></figcaption></figure>

**Step 3:** Click on your project.

<figure><img src="/files/vYl4Ma1dBOkuBem0lGF2" alt=""><figcaption></figcaption></figure>

**Step 4:** Navigate to **Kubernetes** and then click on **K8s Load Balancer**.

<figure><img src="/files/L1bs5QLMBtGUteR7Y7X4" alt=""><figcaption></figcaption></figure>

**Step 6:** Click on **Create Load Balancer**.

<figure><img src="/files/azP6tf81avmErYp5nI8w" alt=""><figcaption></figcaption></figure>

**Step 7:** Enter the **Name** and **Description** for the Load Balancer and click **Next**.

<figure><img src="/files/Akfte4Eb8DvcyWLhTHCn" alt=""><figcaption></figcaption></figure>

**Step 8:** Enter the **Listener Details** and click **Next.**

**Note:**&#x20;

1. If you do not want to create a listener, select **No** and click **Create Load Balancer**.
2. If you have not created **Listener**, you will not be able to create **Pool** and **Monitor.**

<figure><img src="/files/t6H2pmWTxjm4Sk6icIBs" alt=""><figcaption></figcaption></figure>

| **Field**              | **Description**                                                                                                                                                                                           |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name                   | Enter the name of the Listener.                                                                                                                                                                           |
| Description            | Enter the description of the Listener.                                                                                                                                                                    |
| Protocol               | <p>Select a protocol for the listener from the below options:</p><ol start="1"><li>HTTP</li><li>HTTPS</li><li>TCP</li><li>UDP</li><li>SCTP</li></ol>                                                      |
| Port\*                 | The protocol port number for the resource.                                                                                                                                                                |
| Client Data Timeout    | Enter client inactivity timeout in milliseconds. The default is 50000.                                                                                                                                    |
| TCP Inspect Timeout    | Enter time, in milliseconds, to wait for additional TCP packets for content inspection. The default is 0.                                                                                                 |
| Member Connect Timeout | Enter member connection timeout in milliseconds. The default is 5000.                                                                                                                                     |
| Member Data Timeout    | Enter member inactivity timeout in milliseconds. The default is 50000.                                                                                                                                    |
| Allowed CIDRs          | Enter a list of IPv4, IPv6 or mix of both CIDRs.                                                                                                                                                          |
| Connection Limit\*     | The maximum number of connections permitted for this listener. Default value is -1 which represents infinite connections.                                                                                 |
| Insert Headers         | <p>Select the headers to insert into the request before it is sent to the member from the below option:</p><ol start="1"><li>X-Forwarded-For</li><li>X-Forwarded-Port</li><li>X-Forwarded-Proto</li></ol> |

**Step 9:** Enter **Pool Details** and click **Next.**

**Note:** If you do not want to create **Pool** and **Monitor,** select **No** and click **Create Load Balancer.**

<figure><img src="/files/tcWuYAM2oKw5ytKZeVs6" alt=""><figcaption></figcaption></figure>

| **Field**           | **Description**                                                                                                                                                                 |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name                | Enter the name of the Pool.                                                                                                                                                     |
| Description         | Enter the description of the pool.                                                                                                                                              |
| Algorithm           | <p>Select the load balancing algorithm for the pool from the below options:</p><ol start="1"><li>Least connections</li><li>Round robin</li><li>Source IP</li></ol>              |
| TLS Enabled         | <ul><li>Select <strong>YES</strong> to enable TLS, enabling it will help member to use TLS encryption.</li><li>Select <strong>NO</strong> to disable TLS.</li></ul>             |
| TLS Cipher String   | Enter List of ciphers in OpenSSL format and it should be colon-separated.                                                                                                       |
| Session Persistence | <p>Select a JSON object specifying the session persistence for the pool from the below options:</p><ol start="1"><li>HTTP Cookie</li><li>APP Cookie</li><li>Source IP</li></ol> |
| Cookie Name\*       | Enter the name of the cookie to use for session persistence.                                                                                                                    |

**Step 10:** Click on **Add** against the instance, you want to allocate as a member.

<figure><img src="/files/1MOY11Bq77I4wRNmNElC" alt=""><figcaption></figcaption></figure>

**Step 11:** Click on edit icon to enter the port number.

<figure><img src="/files/MjQD7pmHdbTW4FMlY0OT" alt=""><figcaption></figcaption></figure>

**Step 12:** Enter the **Port** number, click on save icon and press the **Next** button.

<figure><img src="/files/EOBbC3ph3dP552y793nL" alt=""><figcaption></figcaption></figure>

**Step 13:** Enter **Health Monitor** details and click **Create Load Balancer.**

**Note:** If you do not want to create **Monitor,** select **No** and click **Create Load Balancer.**

<figure><img src="/files/z4lbES0TCxHM0jvEkRPO" alt=""><figcaption></figcaption></figure>

| **Field**          | **Description**                                                                                                                                                                                                                                 |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name\*             | Enter the name of the Health Monitor.                                                                                                                                                                                                           |
| Type\*             | <p>Select a protocol for the health monitor from the below options:</p><ol start="1"><li>HTTP</li><li>HTTPS</li><li>PING</li><li>TCP</li><li>TLS-HELLO</li><li>UDP-CONNECT</li><li>SCTP</li></ol>                                               |
| Max Retries Down\* | Enter the number of allowed check failures before changing the operating status of the member to ERROR. A valid value is from 1 to 10. The default is 3.                                                                                        |
| Delay (sec)\*      | Enter the interval, in seconds, between health checks. The default is 10.                                                                                                                                                                       |
| Max Retries\*      | Enter the number of successful checks before changing the operating status of the member to ONLINE. The default is 1.                                                                                                                           |
| Timeout (sec)\*    | The time, in seconds, after which a health check times out. The default is 5.                                                                                                                                                                   |
| HTTP Method        | <p>Select the HTTP method that the health monitor uses for requests from the below options:</p><ol start="1"><li>GET</li><li>HEAD</li><li>POST</li><li>PUT</li><li>DELETE</li><li>TRACE</li><li>OPTIONS</li><li>PATCH</li><li>CONNECT</li></ol> |
| Expected Codes     | Enter the HTTP status codes expected in response from the member to declare it healthy. The default is 200.                                                                                                                                     |
| URL Path           | Enter the HTTP URL path of the request sent by the monitor to test the health of a member. Must be a string that begins with a forward slash. The default URL path is /.                                                                        |


---

# 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.acecloud.ai/knowledge-base/kubernetes/how-to-create-kubernetes-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.
