# rpk Profiles

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

---
title: rpk Profiles
latest-operator-version: v26.1.4
# EOL = End-of-Life (support lifecycle status)
page-is-nearing-eol: "false"
page-is-past-eol: "true"
page-eol-date: December 22, 2024
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
docname: config-rpk-profile
page-component-name: streaming
page-version: "23.3"
page-component-version: "23.3"
page-component-title: Streaming
page-relative-src-path: config-rpk-profile.adoc
page-edit-url: https://github.com/redpanda-data/docs/edit/v/23.3/modules/get-started/pages/config-rpk-profile.adoc
description: Use <code>rpk profile</code> to simplify your development experience with multiple Redpanda clusters by saving and reusing configurations for different clusters.
page-git-created-date: "2023-07-31"
page-git-modified-date: "2024-02-26"
support-status: past end-of-life
---

<!-- Source: https://docs.redpanda.com/streaming/23.3/get-started/config-rpk-profile.md -->

Use rpk profiles to simplify your development experience using `rpk` with multiple Redpanda clusters by saving and reusing configurations for different clusters.

## [](#about-rpk-profiles)About rpk profiles

An rpk profile contains a reusable configuration for a Redpanda cluster. When running `rpk`, you can create a profile, configure it for a cluster you’re working with, and use it repeatably when running an `rpk` command for the cluster.

You can create different profiles for different Redpanda clusters. For example, your local cluster, development cluster, and production cluster can each have their own profile, with all of their information managed locally by rpk. You set a unique name for each profile.

A profile saves rpk-specific command properties. For details, see [Specifying command properties](https://docs.redpanda.com/streaming/23.3/get-started/intro-to-rpk/#specifying-command-properties).

All `rpk` commands can read configuration values from a profile. You pass a profile to an `rpk` command by setting the `--profile` flag. For example, the command `rpk topic produce dev-topic --profile dev` gets its configuration from the profile named `dev`.

## [](#work-with-rpk-profiles)Work with rpk profiles

The primary tasks for working with rpk profiles:

-   Create one or more profiles.

-   Choose the profile to use.

-   Edit or set default values across all profiles and values for a single profile.

-   Call an `rpk` command with a profile.

-   Delete unused profiles.


### [](#create-profile)Create profile

To create a new profile, run [`rpk profile create`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-profile/rpk-profile-create/):

```bash
rpk profile create <profile-name> [flags]
```

An rpk profile can be generated from different sources:

-   A `redpanda.yaml` file, using the `--from-redpanda` flag.

-   A different rpk profile, using the `--from-profile` flag.

-   A Redpanda Cloud cluster, using the `--from-cloud` flag.


> 📝 **NOTE**
>
> You must provide a profile name when creating a profile that isn’t generated from a Redpanda Cloud cluster with the `--from-cloud` flag.

After the profile is created, rpk switches to the newly created profile.

You can specify the configuration during creation with the `--set [key=value]` flag. To simplify configuration, the `--set` flag supports autocompletion of valid keys, suggesting key names based on their `-X` format.

> 📝 **NOTE**
>
> You should always use and set the `--description` flag to describe your profiles. The description is printed in the output of [`rpk profile list`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-profile/rpk-profile-list/).

Created profiles are stored in an `rpk.yaml` file in a default local OS directory (for example, `~/.config/rpk/` for Linux and `~/Library/Application Support/rpk/` for MacOS). All profiles created by a developer are stored in the same `rpk.yaml` file.

### [](#choose-profile-to-use)Choose profile to use

With multiple created profiles, choose the profile to use with [`rpk profile use`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-profile/rpk-profile-use/):

```bash
rpk profile use <name-of-profile-to-use>
```

### [](#set-or-edit-configuration-values)Set or edit configuration values

You can configure settings that apply to all profiles. To set these `globals`:

-   Use [`rpk profile set-globals`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-profile/rpk-profile-set-globals/) to set `key=value` pairs to write to the globals section of `rpk.yaml`.

-   Use [`rpk profile edit-globals`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-profile/rpk-profile-edit-globals/) to edit the globals section of the `rpk.yaml` file in your default editor.


You can customize settings for a single profile. To set a profile’s configuration:

-   Use [`rpk profile set`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-profile/rpk-profile-set/) to set `key=value` pairs of configuration options to write to the profile’s section of `rpk.yaml`.

-   Use [`rpk profile edit`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-profile/rpk-profile-edit/) to edit the profile’s section of the `rpk.yaml` file in your default editor.


#### [](#customize-command-prompt-per-profile)Customize command prompt per profile

A configurable field of an rpk profile is the `prompt` field. It enables the customization of the command prompt for a profile, so information about the in-use profile can be displayed within your command prompt.

The format string is intended for a `PS1` prompt. For details on the prompt format string, see the [`rpk profile prompt`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-profile/rpk-profile-prompt/) reference.

The `rpk profile prompt` command prints the ANSI-escaped text of the `prompt` field for the in-use profile. You can call `rpk profile prompt` in your shell’s (rc) configuration file to assign your `PS1`.

For example, to customize your bash prompt for a `dev` rpk profile , first call `rpk profile edit dev` to set its `prompt` field:

```yaml
name: dev
prompt: hi-red, "[%n]"
```

-   `hi-red` sets the text to high-intensity red

-   `%n` is a variable for the profile name


Then in `.bashrc`, set `PS1` to include a call to `rpk profile prompt`:

```bash
export PS1='\u@\h\n$(rpk profile prompt)% '
```

> 📝 **NOTE**
>
> When setting your `PS1` variable, use single quotation marks and not double quotation marks, because double quotation marks aren’t reevaluated after every command.

The resulting prompt looks like this:

username@hostname\[dev\]%

### [](#use-profile-with-rpk-command)Use profile with `rpk` command

An rpk command that can use a profile supports the `--profile <profile-name>` flag. When the `--profile` flag is set for an rpk command, the configuration for the cluster that rpk is interfacing with will be read from the named profile.

See the [rpk commands reference](https://docs.redpanda.com/streaming/23.3/reference/rpk/) for commands that support profiles.

### [](#delete-profile)Delete profile

To delete a profile, run [`rpk profile delete`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-profile/rpk-profile-delete/).

## [](#related-topics)Related topics

For details about all commands for rpk profiles, see the [`rpk profile`](https://docs.redpanda.com/streaming/23.3/reference/rpk/rpk-profile/rpk-profile/) reference page and its sub-pages.