> For the complete documentation index, see [llms.txt](https://docs.cloudeka.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudeka.ai/deka-gpu-documentations/panduan-untuk-enterprise/cloudeka-api-list/command-reference/cldkctl-guard/create-egress.md).

# create-egress

The cldkctl guard command creates an egress rule within a Guard in your project. This command allows you to define outbound traffic restrictions for workloads by specifying the namespace, endpoint selector, and whether to deny all egress traffic

## Usage

```
cldkctl guard create-egress [flags]
```

## Aliases

```
create-egress, add-eg
```

## Steps

Follow the steps below to run and view the result of this command:

1. Run the following command in your terminal:

```
cldkctl guard create-egress
```

<figure><img src="https://753761090-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtAYQyBIz2BclZ3ZHHlS4%2Fuploads%2Fgit-blob-acff518d2ccbdcad691132d6aa35082b5eb3a274%2Funknown.png?alt=media" alt=""><figcaption></figcaption></figure>

2. When prompted, select the Namespace where the Guard will be created.
3. Enter the Endpoint Selector, using one or more labels in key-value format.

<figure><img src="https://753761090-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtAYQyBIz2BclZ3ZHHlS4%2Fuploads%2Fgit-blob-1eabe276b9fbfacd0709c1a7f99aaa31c39f699e%2Funknown.png?alt=media" alt=""><figcaption></figcaption></figure>

4. Confirm whether you want to deny all outgoing traffic for the Guard. Select Confirm to deny all egress traffic, or Cancel to allow traffic unless explicitly restricted.

<figure><img src="https://753761090-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtAYQyBIz2BclZ3ZHHlS4%2Fuploads%2Fgit-blob-3472d628948019e045dc9bb84fe909d55b3ed099%2Funknown.png?alt=media" alt=""><figcaption></figcaption></figure>

5. Wait for the system to process the request.
6. Once the process is successful, the terminal displays the message **“✔ Guard deny all egress has been successfully created”.**

## Flags

{% hint style="info" %}
This command supports global flags. Refer to the Global Flags section for details
{% endhint %}

| Flag                            | Description                               |
| ------------------------------- | ----------------------------------------- |
| -e, --endpoint\_selector string | Specify the endpoint selector.            |
| -h, --help                      | Help for the guard create-egress command. |
| -n, --namespace string          | Specify the namespace.                    |
