> 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-manage-listeners-in-a-kubernetes-load-balancer.md).

# How to Manage Listeners in a Kubernetes Load Balancer?

### a. How to View all Listeners of a Kubernetes Load Balancer?

To view all listeners of the Kubernetes load balancer, follow the steps given below:

**Step 1:** [Login](https://customer.acecloud.ai/) to your account.

**Step 2:** Navigate to **Kubernetes,** choose **Dedicated,** and then click **K8s Load Balancer**.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2FmcqVcYJJcdlRNlnTgBsr%2Fimage.png?alt=media&amp;token=abaffada-0458-48d9-a531-aed0c3de9e0c" alt=""><figcaption></figcaption></figure>

**Step 3:** Click on the load balancer name for which you want to view the listeners.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2F1EGTZ9fkinj5XKddM09J%2Fimage.png?alt=media&amp;token=20ff5db3-91f5-4884-a61f-461527982b13" alt=""><figcaption></figcaption></figure>

**Step 4:** Go to the **Listener** tab, and here you can view all listeners.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2FTBd4CN63aY8agR0lmj5v%2Fimage.png?alt=media&amp;token=8835c8ea-c931-40d4-9ee1-ec47f770c083" alt=""><figcaption></figcaption></figure>

### b. How to Create a Listener in Kubernetes Load Balancer?

**Step 1**: Click on the **load balancer name** for which you want to create a listener.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2F2DVLBD1R3MGh5Vmni1kd%2Fimage.png?alt=media&amp;token=626db31d-f0cb-4a2a-9303-addb7853584c" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2Fa3UpSAKo8p4pk6WTNGhb%2Fimage.png?alt=media&amp;token=05d24c71-7b65-4a9a-823e-dd1b78868d0a" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2Fengm2OK2HgVfgzsNtaG4%2Fimage.png?alt=media&amp;token=1a1634f1-755b-4cec-bb2c-3258aca5311b" 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.                            |

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

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2FjDVNWAFp7fVwDFuVaXzh%2Fimage.png?alt=media&amp;token=183f19cd-9bfe-43eb-95d4-1655e561bc51" alt=""><figcaption></figcaption></figure>

***Note:** If you do not want to create a **Pool** and **Monitor,** disable the **Pool Details toggle** and click **Create Listener.***

| **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>              |
| Protocol            | The protocol for which this pool and its members listen. A valid value is HTTP, HTTPS, PROXY, PROXYV2, TCP, UDP or SCTP.                                                        |
| 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 5:** Enter the **Health Monitor details, then** click **Next.**

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2FqELbYvEzlDe2Vz1EbtPE%2Fimage.png?alt=media&amp;token=af9c8cd4-7262-4fee-8c34-bb6b84b7562d" alt=""><figcaption></figcaption></figure>

***Note:** If you do not want to create a **Monitor,** disable the **Health Monitor Details toggle.***

| **Field**                 | **Description**                                                                                                                                                                                                                                 |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name\*                    | Enter the name of the Health Monitor                                                                                                                                                                                                            |
| Health Monitor Protocol\* | <p>Select a protocol for the health monitor from the options below:</p><ol start="1"><li>HTTP</li><li>HTTPS</li><li>PING</li><li>TCP</li><li>TLS-HELLO</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 /.                                                                        |

**Step 6**: Turn on the **Backend Server Details** toggle.

Enable the **Backend Server Details** toggle to add backend servers that will receive traffic from the load balancer.

Choose one of the following methods to add backend servers:

* **Select from Existing Servers** – Select a server from the configured server list.
* **Specify IP Address Manually** – Enter the backend server IP address and port details manually.

Select the backend server, then configure the **Protocol Port**, **Monitor Address**, **Monitor Port**, and **Weight**. Once the backend server is added, click **Next**.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2FVhc9W6Tb4iUdjGCxOAus%2Fimage.png?alt=media&amp;token=6c23829f-10ba-4b08-95af-1a55e9c45755" alt=""><figcaption></figcaption></figure>

***Note:** Ensure the backend server has an active service running on the configured monitor port. Otherwise, the load balancer health check may fail.*

**Step 7**: Review the listener configuration and click **Submit**.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2FRXgnpL7U026CamOWP9Tb%2Fimage.png?alt=media&amp;token=8b5a139c-d431-4c80-895c-0a802347e306" alt=""><figcaption></figcaption></figure>

### c. How to Edit a Listener in Kubernetes Load Balancer?

**Step 1:** Click on the load balancer name for which you want to edit a listener.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2Fy4gKVZqfcPt4tUo6XrPU%2Fimage.png?alt=media&amp;token=a2be2a4d-b035-4645-8a3f-dd8df4b0744a" alt=""><figcaption></figcaption></figure>

**Step 2**: Go to the **Listener** tab and click on the three dots against the listener and choose **Edit Listener**.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2FHymeVGcUMSQP8L80uEl5%2Fimage.png?alt=media&amp;token=eb11cc0e-841e-4602-a365-ea3dc8f1fa7d" alt=""><figcaption></figcaption></figure>

**Step 3:** Update the details and click **Submit**.

<figure><img src="https://611918185-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZE65sl2QJgZthXIMR4N7%2Fuploads%2FO1KotyMrWCY48ORLvtdq%2Fimage.png?alt=media&amp;token=fe7ddb19-0703-422e-87ff-6c6f7370268d" alt=""><figcaption></figcaption></figure>
