# rpk security secret update

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: rpk security secret update
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: rpk/rpk-security/rpk-security-secret-update
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: rpk/rpk-security/rpk-security-secret-update.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/rpk/rpk-security/rpk-security-secret-update.adoc
page-git-created-date: "2025-05-09"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/rpk/rpk-security/rpk-security-secret-update.md -->

Update an existing secret for your cluster.

Scopes define the areas where the secret can be used. Available scopes are:

-   `redpanda_connect`

-   `redpanda_cluster`


You can set one or both scopes on a secret. Updating a secret’s scopes will overwrite its current scopes.

## [](#usage)Usage

```bash
rpk security secret update [flags]
```

## [](#examples)Examples

To update the value of the secret:

```bash
rpk security secret update --name NETT --value new_value
```

To update the scope of a secret to both `redpanda_connect` and `redpanda_cluster`:

```bash
rpk security secret update --name NETT2 --value value --scopes redpanda_connect,redpanda_cluster
```

## [](#flags)Flags

| Value | Type | Description |
| --- | --- | --- |
| -h, --help | - | Help for update. |
| --name | string | Name of the secret. The name must be in uppercase and can only contain letters, digits, and underscores. You cannot update the name of an existing secret. |
| --scopes | stringArray | Scope(s) of the secret (for example, redpanda_connect). |
| --value | string | New value of the secret. |
| --config | string | Redpanda or rpk config file. Default search paths are /var/lib/redpanda/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml. |
| -X, --config-opt | stringArray | Override rpk configuration settings. See rpk -X or run rpk -X help for inline detail or rpk -X list for terser detail. |
| --profile | string | rpk profile to use. |
| -v, --verbose | - | Enable verbose logging. |