# create

The cldkctl registry tag create command creates a new tag immutability rule in the container registry. This rule helps prevent specific tags from being overwritten or deleted, protecting critical container images from accidental modification. It is commonly used to enforce image version stability.

## Usage

```
cldkctl registry tag create [flags]
```

## Steps

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

1. Ensure that you are logged in. Refer to the Registry Login section.
2. Run the following command in your terminal:

```
cldkctl --registry [registry name] registry tag create \
  --repo [repository name] \
  --repo-op [matching|excluding] \
  --tag [tag pattern] \
  --tag-op [matching|excluding]
```

3. To get the list of available registries, refer to the Registry List section.
4. To get the list of available repositories, refer to the Registry Repo List section.
5. Replace `[registry name`] with the target registry, \[repository name] with the repository name you want to protect, `[tag pattern]` with the tag pattern to include or exclude, and `[repo-op] / [tag-op]` with the operation mode (matching or excluding).
6. Once successful, the terminal displays **"✓ Registry tag immutability rule created".**

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

## Flags

{% hint style="info" %}
This command supports [global flags](/cloudeka-api-list/global-flags.md). Refer to the Global Flags section for details
{% endhint %}

| Flag             | Description                                                                                                                                                                                         |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| -h, --help       | Help for the registry tag create command.                                                                                                                                                           |
| --repo string    | Specifies the name or pattern of the repository where the rule will apply.                                                                                                                          |
| --repo-op string | Defines how the repository pattern should be interpreted. Use matching to apply the rule to repositories that fit the specified pattern, or excluding to exclude repositories that fit the pattern. |
| --tag string     | Specifies the tag name or pattern that will be affected by the rule.                                                                                                                                |
| --tag-op string  | Defines how the tag pattern should be applied. Use matching to include tags that fit the specified pattern, or excluding to exclude tags that fit the pattern.                                      |


---

# 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.cloudeka.ai/cloudeka-api-list/command-reference/cldkctl-registry/tag/create.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.
