---
title: "Set up the CircleCI release agent"
description: "Tutorial outlining how to set up the CircleCI release agent, covering creating an environment integration, installing the release agent and creating components."
platform: "Cloud"
doc_version: "unversioned"
last_updated: "2026-09-28"
cloud_plans: "Free, Performance, Scale"
version_control: "All supported providers"
---

> For current CircleCI product defaults, deprecated patterns, and Cloud/Server differences, see [AGENTS.md](https://circleci.com/docs/AGENTS.md).
>
> For the complete documentation index and site structure, see [llms.txt](https://circleci.com/docs/llms.txt).

# Set up the CircleCI release agent

**Cloud plans:** Free, Performance, Scale

**Version control:** [All supported providers](https://circleci.com/docs/guides/integration/version-control-system-integration-overview/)

Visualize and control deployments to your Kubernetes cluster with the CircleCI release agent. The steps outlined on this page guide you to set up the CircleCI release agent for deploy management and monitoring using the CircleCI web app onboarding process. Alternatively, once you have set up an environment integration, you can follow the guides linked below to install the release agent and configure components manually.

## Introduction

In this tutorial you will set up an integration between CircleCI and your Kubernetes environment. Deploy status is reported to the CircleCI web app, and the following commands are executable in your cluster or service by the release agent via controls in the CircleCI UI:

*   Restore version
    
*   Scale version
    
*   Restart version
    

When using Argo Rollouts, the following commands are also available:

*   Retry Rollout
    
*   Promote Rollout
    
*   Cancel Rollout
    

## Prerequisites

Before setting up your environment integration with CircleCI, run through the following prerequisites:

*   A CircleCI account connected to your code. You can [sign up for free](https://circleci.com/signup/).
    
*   A Kubernetes cluster.
    
*   A project building on CircleCI that deploys to your Kubernetes cluster. See the [Create a Project](https://circleci.com/docs/guides/getting-started/create-project/) page for steps.
    
*   You must have write access to the project associated with the component being deployed. For full details of roles and permissions for `circleci` type organizations see the [Roles and Permissions Overview](https://circleci.com/docs/guides/permissions-authentication/roles-and-permissions-overview/). If you have a `github` or `bitbucket` type organization, you will need to be an org admin in Bitbucket/GitHub respectively.
    

To check your organization type, check your organization slug at **Organization settings**  **Overview**. `github` and `bitbucket` type organizations are OAuth authenticated orgs and the organization slug is structured as follows:

*   `github/<your-org-name>` or `gh/<your-org-name>`
    
*   `bitbucket/<your-org-name>` or `bb/<your-org-name>`
    

An organization slug for a `circleci` type organization is in the following format:

*   `circleci/<UID>`
    

We support the three latest Kubernetes minor releases and the two latest minor releases of Helm and of Argo Rollouts (optional). Release agent chart **1.6.2** with agent image **1.6.2** was end-to-end tested across every combination of the versions in the following table. Older versions may work but are not guaranteed:

<table><thead><tr><th>Tool</th><th>Tested versions</th></tr></thead><tbody><tr><td>Kubernetes</td><td><div><div><p>1.36.1<br>1.35.5<br>1.34.8</p></div></div></td></tr><tr><td>Helm</td><td><div><div><p>3.21.0<br>3.20.2</p></div></div></td></tr><tr><td>Argo Rollouts (optional)</td><td><div><div><p>1.9.0<br>1.8.4</p></div></div></td></tr></tbody></table>

### Labels and annotations

The following table shows a complete list of labels and annotations either required or available for configuring your environment integration. You will be guided to set these up in the in-app setup process. These are not strictly a prerequisite but will be required for the release agent to work.

|  | Label/Annotation | Value | Required? |
| --- | --- | --- | --- |
| `Metadata.Labels` | `circleci.com/component-name` | A name for your application | Yes |
| `Metadata.Labels` | `circleci.com/version` | Current version | Yes |
| `Spec.Template.Metadata.Labels` | `circleci.com/component-name` | See above | Yes |
| `Spec.Template.Metadata.Labels` | `circleci.com/version` | See above | Yes |
| `Metadata.Annotations` | `circleci.com/project-id` | Project ID for the CircleCI project associated with the job that deploys your component | Yes |
| `Metadata.Annotations` | `circleci.com/operation-timeout` | A [Go duration string](https://pkg.go.dev/time#ParseDuration), for example, 5m, 10m15s | No. Only needed to set a custom timeout duration. This option is only available if you are using Helm to configure your Kubernetes resources. |
| `Metadata.Annotations` | `circleci.com/restore-version-enabled` | `false` | No. Only set if you want to disable the restore version feature for your component. |
| `Metadata.Annotations` | `circleci.com/scale-component-enabled` | `false` | No. Only set if you want to disable the scale component feature for your component. |
| `Metadata.Annotations` | `circleci.com/restart-component-enabled` | `false` | No. Only set if you want to disable the restart component feature for your component. |
| `Metadata.Annotations` | `circleci.com/retry-release-enabled` | `false` | No. Only set if you want to disable the retry deployment feature for your component. |
| `Metadata.Annotations` | `circleci.com/promote-release-enabled` | `false` | No. Only set if you want to disable the promote deployment feature for your component. |
| `Metadata.Annotations` | `circleci.com/cancel-release-enabled` | `false` | No. Only set if you want to disable the cancel deployment feature for your component. |

## Set up the CircleCI release agent

1.  In the CircleCI web app, select **Deploys** in the sidebar.
    
2.  Choose the **Environments** tab and select **Create environment integration**.
    
3.  Enter a name for your environment, and a description if you would like.
    
4.  Use the dropdown menu to choose your environment integration type: **Kubernetes Cluster**, then select **Next: Release Agent Setup**.
    
5.  To install the release agent into your cluster and set up your components, follow the in-app setup steps. If you would rather continue the setup process manually, see the [Optional manual setup](#optional-manual-setup) section on this page.
    
    The in-app setup is now spread across two pages:
    
    *   **Release agent setup**, which has the following steps:
        
        > **Image:** Screenshot showing the release agent setup page
        
        Figure 1. Release agent setup
        
        *   Add CircleCI’s release agent Helm repository.
            
        *   Install CircleCI’s release agent into your Kubernetes cluster with Helm.
            
        
    *   **Component setup**, which has the following steps:
        
        > **Image:** Screenshot showing the component setup page
        
        Figure 2. Component setup
        
        *   Add CircleCI components and enable deployment tracking.
            
        *   Display component deployment trigger (optional).
            
        *   Configure component deployment actions (optional).
            
        
    

After completing all the setup steps in the app, you will have done the following:

*   Set up an environment integration.
    
*   Installed the release agent into your Kubernetes cluster.
    
*   Configured your Kubernetes components.
    

Alternatively, you can find manual setup instructions for your Kubernetes components in the [Configure Your Kubernetes Components](https://circleci.com/docs/guides/deploy/configure-your-kubernetes-components/) page.

## Optional manual setup

This section shows how to manually install the CircleCI release agent into your Kubernetes cluster. This manual installation guide is an alternative to using the in-app deploys set up process as described in the sections above.

### 1\. Add the release agent into your Kubernetes cluster

Use Helm to install the CircleCI release agent into your Kubernetes cluster.

1.  Add the [CircleCI release agent Helm repository](https://circleci-public.github.io/cci-k8s-release-agent/) by running the following command:
    
    ```shell
    helm repo add release-agent https://circleci-public.github.io/cci-k8s-release-agent
    ```
    
2.  Then, update your local Helm chart repository cache:
    
    ```shell
    helm repo update
    ```
    

### 2\. Create an integration token

You will need a `CCI_INTEGRATION_TOKEN` to install the CircleCI release agent into your cluster. To create an integration token, follow these steps:

1.  In the CircleCI web app, select **Deploys** in the sidebar.
    
2.  Navigate to the **Environments** tab.
    
3.  Select the gear icon corresponding to the environment you just created to enter the Environment Integration Settings page.
    
4.  Select **Create Integration Token** and then **Create Token**.
    
5.  The new token will be displayed. Copy the token, then select **Done**.
    

**The integration token is shown only once and cannot be retrieved from CircleCI later**. Store the integration token in your organization’s secret manager. Examples of secret managers include HashiCorp Vault, AWS Secrets Manager, or a CircleCI context variable.

Pass the integration token to Helm at install or upgrade time. Use an environment variable (for example, `--set tokenSecret.token="$CCI_INTEGRATION_TOKEN"`) or a values file that is not committed to source control.

After installation, the Helm chart stores the integration token in a Kubernetes Secret in the `circleci-release-agent-system` namespace. On subsequent `helm upgrade` runs, you do not need to supply the integration token again unless you use `--reset-values`. The same applies if you apply a values file that omits `tokenSecret.token` without also setting `--reuse-values`.

### 3\. Install the release agent

Use the following command to install the Helm chart to integrate CircleCI’s release agent into your Kubernetes cluster.

If required, you can include a list of Kubernetes namespaces you want to monitor with `--set managedNamespaces="{namespace1,namespace2}"`. If you only want to monitor the `default` namespace, you do not need to supply a list. The `default` namespace is monitored by default. If you struggle to pass the `managedNamespaces` value, try enclosing the array value or the whole parameter itself in a string, with double or single quotes.

```shell
helm upgrade --install circleci-release-agent-system release-agent/circleci-release-agent \
--set tokenSecret.token=[YOUR_CCI_INTEGRATION_TOKEN] --create-namespace \
--namespace circleci-release-agent-system \
--set managedNamespaces="{namespace1,namespace2}"
```

You can further customize the agent installation and check all available options in the [release agent Helm repository](https://circleci-public.github.io/cci-k8s-release-agent/).

Once you have run this command, you can check your environment is set up by navigating to the environment details page to check the "last used" date has been populated. To navigate to the environment details page, follow these steps:

1.  Select **Deploys** in the CircleCI web app sidebar.
    
2.  Select the **Environments** tab.
    
3.  Select the name of your environment integration to view the environment details page.
    

### Configure managed namespaces mode

Release agent v1.6.0 and Helm chart v1.6.0 or higher are required to use managed namespaces mode.

Release agent v1.6.0 and Helm chart v1.6.0 introduce a `managedNamespacesMode` Helm value. This setting (exposed as `MANAGED_NAMESPACES_MODE` on the agent deployment) controls how the agent determines which namespaces to monitor. Managed namespaces mode has two options as follows:

*   `static` (default): The agent monitors the exact namespace names listed in `managedNamespaces`. The `static` mode matches the behavior of prior versions and requires no additional RBAC permissions.
    
*   `dynamic`: The agent discovers namespaces at runtime by matching the patterns in `managedNamespaces` against all cluster namespaces. Use glob patterns such as `team-*` to monitor any namespace whose name matches the pattern.
    

#### Use static mode (default)

In static mode, `managedNamespaces` contains a list of exact namespace names. This mode requires no additional RBAC permissions beyond those granted in earlier chart versions.

To upgrade and use `static` mode, run the following command:

```shell
helm upgrade --install circleci-release-agent-system release-agent/circleci-release-agent \
  --set tokenSecret.token=[YOUR_CCI_INTEGRATION_TOKEN] --create-namespace \
  --namespace circleci-release-agent-system \
  --set managedNamespaces="{namespace1,namespace2}"
```

#### Use dynamic mode

In dynamic mode, `managedNamespaces` accepts glob patterns. The agent queries the Kubernetes API at runtime to resolve which namespaces match each pattern.

When installing or upgrading for dynamic mode, set `rbac.clusterRoles=true`, in addition to `rbac.create=true`. This enables the chart to create the required `ClusterRole` with `get`, `list`, and `watch` permissions on the `namespaces` resource.

To upgrade and use `dynamic` mode, run the following command:

```shell
helm upgrade --install circleci-release-agent-system release-agent/circleci-release-agent \
  --set tokenSecret.token=[YOUR_CCI_INTEGRATION_TOKEN] --create-namespace \
  --namespace circleci-release-agent-system \
  --set managedNamespaces="{team-*,platform-*}" \
  --set managedNamespacesMode=dynamic \
  --set rbac.create=true \
  --set rbac.clusterRoles=true
```

The `rbac.clusterRoles=true` flag also enables the RBAC permissions the agent needs to watch workloads across all matching namespaces. Both flags are required for dynamic mode to function correctly.

#### Upgrade from an earlier version

If you are upgrading from a version earlier than 1.6.0, your existing configuration uses static mode by default. No action is required. The agent continues to monitor the exact namespace names already listed in `managedNamespaces`, and no new RBAC permissions are granted.

To check your installed release agent version, run the following command and refer to the `CHART` and `APP VERSION` columns:

```shell
helm list --namespace circleci-release-agent-system
```

To switch to dynamic mode after upgrading, re-run `helm upgrade` with `--set managedNamespacesMode=dynamic --set rbac.clusterRoles=true` and update `managedNamespaces` to use glob patterns where needed.

## Next steps

In this tutorial you have integrated your Kubernetes cluster with CircleCI. You can now:

*   [Configure Your Kubernetes Components](https://circleci.com/docs/guides/deploy/configure-your-kubernetes-components/).
    
*   Learn how to [Update the Kubernetes Release Agent](https://circleci.com/docs/guides/deploy/update-the-kubernetes-release-agent/).