> For the complete documentation index, see [llms.txt](https://docs.acecloud.ai/knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acecloud.ai/knowledge-base/kubernetes/how-to-create-a-listener-in-kubernetes-load-balancer.md).

# How to Create a Listener in Kubernetes Load Balancer?

To create a listener in 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/vFWgkYIT19BqSx50WL0X" alt=""><figcaption></figcaption></figure>

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

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

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

<figure><img src="/files/N7otBKurdl1SgB87m6ej" 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 5:** Click on the load balancer name for which you want to create a listener.

<figure><img src="/files/2WUR51fklY0b0T3h60F5" alt=""><figcaption></figcaption></figure>

**Step 6:** Go to **Listener** tab and click on **Create Listener.**

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

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

<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 8:** Enter **Pool Details** and click **Next.**

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

<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 9:** Click on **Add** against the instance, you want to allocate as a member.

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

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

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

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

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

**Step 12:** Enter **Health Monitor** details and click **Create Listener.**

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

<figure><img src="/files/rCqmWJLueVHcJ6b8aE2e" 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 /.                                                                        |
