# How to Create a L7 Rule?

To create a L7 rule 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/oGgAJCTAObQ8nVKMZtVF" alt=""><figcaption></figcaption></figure>

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

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

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

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

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

**Step 6:** Go to **Listener** tab and click on the listener's name for which you want to create a L7 rule.

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

**Step 7:** Go to the **L7 Policies** tab and click on policy name for which you want to create a L7 rule.

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

**Step 8:** Got to **L7Rules** tab and click on **Create L7 Rule**.

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

**Step 9:** Enter the details and click on **Create L7 Rule.**

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

| Field          | Description                                                                                                                                                     |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Invert         | Select **Yes,** if you want the logic of the rule to be inverted or select **No**, if you want the logic of the rule to be same as set.                         |
| Type\*         | <p>Select the L7 rule type from the below mention option:<br>1. HOST\_NAME<br>2. PATH<br>3. FILE\_TYPE<br>4. HEADER<br>5. COOKIE</p>                            |
| Compare Type\* | <p>Select the comparison type for the L7 rule from the below mention option:<br>1. REGEX<br>2. EQUAL\_TO<br>3. STARTS\_WITH<br>4. ENDS\_WITH<br>5. CONTAINS</p> |
| Value          | Enter the value to use for the comparison.                                                                                                                      |


---

# 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-a-l7-rule.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.
