Skip to content

Commit 70abf7a

Browse files
authored
DOC-11438 Docs for cc/console: Grouping clusters by labels (#19484)
Added labels.md. Added link to labels.md to: *cluster-management.md authorization.md, in Cluster Operator section folder-admin include file billing-management.md, in View Credits balance section cloud-deployments.json. In releases/cloud.md, added release note for labels. In cluster-overview-page.md, added labels to settings for Standard/Basic and not Advanced. In cluster-management.md include file, fixed html_page_filenames list so that filter tabs appear. Deleted cluster-management-advanced.md. In redirects.yml, added entry for cluster-management-advanced.md to advanced-cluster-management. * Incorporated Ayushi’s and Kris’s feedback. * Incorporated Mike’s feedback.
1 parent 0809b4d commit 70abf7a

14 files changed

+130
-103
lines changed

src/current/_data/redirects.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,10 @@
873873
sources: ['cockroachcloud/serverless-cluster-management.md']
874874
versions: ['cockroachcloud']
875875

876+
- destination: cockroachcloud/advanced-cluster-management.md
877+
sources: ['cockroachcloud/cluster-management-advanced.md']
878+
versions: ['cockroachcloud']
879+
876880
- destination: cockroachcloud/connect-to-a-basic-cluster.md
877881
sources: ['cockroachcloud/connect-to-a-serverless-cluster.md']
878882

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{% assign tab_names_html = "CockroachDB Basic;CockroachDB Standard;CockroachDB Advanced" %}
2-
{% assign html_page_filenames = "basic-cluster-management.html;cluster-management.html;cluster-management-advanced.html;advanced-cluster-management.html" %}
2+
{% assign html_page_filenames = "basic-cluster-management.html;cluster-management.html;advanced-cluster-management.html" %}
33

44
{% include filter-tabs.md tab_names=tab_names_html page_filenames=html_page_filenames page_folder="cockroachcloud" %}

src/current/_includes/cockroachcloud/org-roles/folder-admin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
A {% if page.name == 'authorization.md' %}**Folder Admin**{% else %}[**Folder Admin**]({% link cockroachcloud/authorization.md %}#folder-admin){% endif %} can create, rename, and move, or delete folders where they are granted the role, and they can also manage access to these folders. This role can be granted at the level of the organization or on a specific folder. If granted at the level of the organization, the role grants the ability to view all users and service accounts in the organization. If granted on a specific folder, the role is inherited by descendant folders.
1+
A {% if page.name == 'authorization.md' %}**Folder Admin**{% else %}[**Folder Admin**]({% link cockroachcloud/authorization.md %}#folder-admin){% endif %} can create, rename, and move, or delete folders where they are granted the role, and they can also manage access to these folders. They can also [edit folder labels]({% link cockroachcloud/labels.md %}). This role can be granted at the level of the organization or on a specific folder. If granted at the level of the organization, the role grants the ability to view all users and service accounts in the organization. If granted on a specific folder, the role is inherited by descendant folders.
22

33
A user with the {% if page.name == 'authorization.md' %}[Org Administrator](#org-administrator){% else %}[Org Administrator]({% link cockroachcloud/authorization.md %}#org-administrator){% endif %} role can grant themselves, another user, or a service account the Folder Admin role.
44

src/current/_includes/v25.1/sidebar-data/cloud-deployments.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,16 @@
292292
]
293293
},
294294
{
295-
"title": "Organize CockroachDB Cloud Clusters Using Folders",
296-
"urls": [
297-
"/cockroachcloud/folders.html"
298-
]
295+
"title": "Organize CockroachDB Cloud Clusters Using Folders",
296+
"urls": [
297+
"/cockroachcloud/folders.html"
298+
]
299+
},
300+
{
301+
"title": "Organize CockroachDB Cloud Resources Using Labels",
302+
"urls": [
303+
"/cockroachcloud/labels.html"
304+
]
299305
}
300306
]
301307
},

src/current/_includes/v25.2/sidebar-data/cloud-deployments.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,16 @@
292292
]
293293
},
294294
{
295-
"title": "Organize CockroachDB Cloud Clusters Using Folders",
296-
"urls": [
297-
"/cockroachcloud/folders.html"
298-
]
295+
"title": "Organize CockroachDB Cloud Clusters Using Folders",
296+
"urls": [
297+
"/cockroachcloud/folders.html"
298+
]
299+
},
300+
{
301+
"title": "Organize CockroachDB Cloud Resources Using Labels",
302+
"urls": [
303+
"/cockroachcloud/labels.html"
304+
]
299305
}
300306
]
301307
},

src/current/cockroachcloud/advanced-cluster-management.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ The [**Overview** page]({% link cockroachcloud/cluster-overview-page.md %}) disp
2525

2626
From the **Overview** page, you can connect to your cluster. For more information, see [Connect to Your CockroachDB {{ site.data.products.advanced }} Cluster]({% link cockroachcloud/connect-to-your-cluster.md %}).
2727

28+
## Edit labels
29+
30+
You can [organize CockroachDB {{ site.data.products.cloud }} clusters using labels]({% link cockroachcloud/labels.md %}).
31+
2832
## Scale your cluster
2933

3034
These sections show how to scale a {{ site.data.products.advanced }} cluster horizontally by adding or removing nodes or vertically by changing each node's storage and compute resources.

src/current/cockroachcloud/authorization.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Cluster Operators can perform a variety of cluster functions:
8989
- Configure single sign-on (SSO) enforcement.
9090
- Access the [DB Console]({% link cockroachcloud/network-authorization.md %}#db-console).
9191
- Configure a cluster's [maintenance window]({% link cockroachcloud/advanced-cluster-management.md %}#set-a-maintenance-window).
92+
- [Edit a cluster's labels]({% link cockroachcloud/labels.md %}).
9293

9394
- *Service accounts* with this role can perform the following *API operations*:
9495

src/current/cockroachcloud/basic-cluster-management.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ To view and manage a specific cluster, click the name of the cluster. The [**Ove
1919

2020
The **Overview** page displays details about the selected CockroachDB {{ site.data.products.basic }} cluster. For more information, see [Cluster Overview Page]({% link cockroachcloud/cluster-overview-page.md %}).
2121

22+
## Edit labels
23+
24+
You can [organize CockroachDB {{ site.data.products.cloud }} clusters using labels]({% link cockroachcloud/labels.md %}).
25+
2226
## Estimate usage cost
2327

2428
{{site.data.alerts.callout_info}}

src/current/cockroachcloud/billing-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ If your organization has an annual contract with CockroachDB {{ site.data.produc
133133

134134
Under the **Credits** section, you can see more information about each of your organization's contracts. Contracts are listed in the order in which they will be used.
135135

136-
Under the **Spend over time** section, you can see a table of each of your organization's clusters and the costs they have accrued.
136+
The **Current billing period** section displays a table listing your organization's clusters and the Credits they have accrued. The table also includes the cluster type and associated [labels]({% link cockroachcloud/labels.md %}).
137137

138138
## View invoices
139139

src/current/cockroachcloud/cluster-management-advanced.md

Lines changed: 0 additions & 90 deletions
This file was deleted.

src/current/cockroachcloud/cluster-management.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ The [**Overview** page]({% link cockroachcloud/cluster-overview-page.md %}) disp
2929

3030
From the **Overview** page, you can connect to your cluster. For more information, refer to [Connect to Your CockroachDB {{ site.data.products.standard }} Cluster]({% link cockroachcloud/connect-to-your-cluster.md %}).
3131

32+
## Edit labels
33+
34+
You can [organize CockroachDB {{ site.data.products.cloud }} clusters using labels]({% link cockroachcloud/labels.md %}).
35+
3236
## Add a region to your cluster
3337

3438
1. Navigate to the cluster's **Overview** page.

src/current/cockroachcloud/cluster-overview-page.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ The **Cluster Overview** page displays key metrics about your CockroachDB {{ sit
1616

1717
## Cluster settings
1818

19-
The **Cluster settings** panel displays the settings you chose during [cluster creation]({% link cockroachcloud/create-a-basic-cluster.md %}).
19+
The **Cluster settings** panel shows the settings selected during [cluster creation]({% link cockroachcloud/create-a-basic-cluster.md %}), as well as any [labels]({% link cockroachcloud/labels.md %}) added to the cluster after its creation.
2020

2121
| Field | Description |
2222
|-----------|---------------------------------------------------------------------------------------------------------|
2323
| Cloud | The cluster's [cloud provider]({% link cockroachcloud/create-a-basic-cluster.md %}#step-2-select-the-cloud-provider). |
2424
| Plan type | The plan type used to create the cluster. |
25-
| Regions | The cluster's [regions]({% link cockroachcloud/create-a-basic-cluster.md %}#step-3-select-the-regions). |
25+
| Regions | The cluster's [regions]({% link cockroachcloud/create-a-basic-cluster.md %}#step-3-select-the-regions). |
26+
| Labels | The [labels]({% link cockroachcloud/labels.md %}) added to the cluster. |
2627

2728
## Capacity used this month
2829

src/current/cockroachcloud/labels.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: Organize CockroachDB Cloud Resources Using Labels
3+
summary: Learn how to use labels to organize CockroachDB Cloud clusters and folders.
4+
toc: true
5+
docs_area: manage
6+
---
7+
8+
CockroachDB {{ site.data.products.cloud }} supports labels as a flexible way to categorize and manage your [clusters]({% link cockroachcloud/cluster-management.md %}) and [folders]({% link cockroachcloud/folders.md %}). Labels help you track usage, analyze [billing]({% link cockroachcloud/billing-management.md %}#view-credits-balance), automate operations, and streamline reporting across your organization.
9+
10+
## What are labels?
11+
12+
Labels are customizable key-value pairs that you can attach to CockroachDB {{ site.data.products.cloud }} resources. Unlike folders, which allow one-to-many relationships, labels support many-to-many relationships, ideal for complex environments which require a variety of tagging criteria.
13+
14+
## Common use cases
15+
16+
You can set labels for:
17+
18+
- **Environment tracking**: Distinguish between stages like `environment:production`, `environment:staging`, or `environment:test` to simplify deployment workflows and access control.
19+
- **Cost allocation**: Use labels like `team:analytics` or `cost_center:finance` to track usage and spending across departments in billing exports.
20+
- **Ownership and accountability**: Assign operational responsibility with labels such as `team:order-management` or `owner:platform-engineering`.
21+
- **Automation and lifecycle management**: Automate actions using labels like `state:active`, `state:archive`, or `state:ready-to-delete` in scripts and infrastructure-as-code tools.
22+
- **Custom organization**: Apply labels based on application, region, or any other criteria relevant to your workflows, e.g. the application, workload, or region applicable to a cluster.
23+
24+
These labels can then be used to:
25+
26+
- Filter and group resources in the Console.
27+
- Power cost reports and analytics.
28+
- Drive automation through APIs or Terraform.
29+
- Provide consistent metadata across teams and environments.
30+
31+
## Requirements for labels
32+
33+
The labels applied to a resource must meet the following requirements:
34+
35+
- Each resource can have up to 50 labels.
36+
- Label keys are required, and must start with a lowercase letter and can include lowercase letters, numbers, underscores, and dashes (up to 63 characters).
37+
- Label values can include only lowercase letters, numbers, dashes, and must be between 0 and 63 characters.
38+
- Keys are unique per resource. For example, if cluster A has a label `environment:production`, it cannot also have a label `environment:development`.
39+
- Across the organization, each key can have multiple values. For example, folder A can have a label `environment:development`, folder B can have a label `environment:testing`, and folder C can have a label `environment:production`.
40+
- Labels are visible across your organization once created.
41+
42+
## Edit labels
43+
44+
You can apply labels to your cluster or folder through the [CockroachDB {{ site.data.products.cloud }} Console](https://cockroachlabs.cloud/) or using the CockroachDB Cloud API (refer to the schema for creating a [cluster](https://www.cockroachlabs.com/docs/api/cloud/v1#post-/api/v1/clusters) or [folder](https://www.cockroachlabs.com/docs/api/cloud/v1#post-/api/v1/folders)) or [Terraform provider](https://registry.terraform.io/providers/cockroachdb/cockroach/latest/docs).
45+
46+
Adding or deleting labels on a cluster requires the [Cluster Admin]({% link cockroachcloud/authorization.md %}#cluster-administrator) or [Cluster Operator]({% link cockroachcloud/authorization.md %}#cluster-operator) role.
47+
48+
1. Navigate to the cluster on the [**Clusters** page]({% link cockroachcloud/cluster-management.md %}#view-clusters-page) and click the menu button in the **Action** column. Alternatively, navigate to the [**Overview** page]({% link cockroachcloud/cluster-management.md %}#view-cluster-overview) for the cluster and click **Actions** in the top right corner.
49+
1. In the dropdown menu, select **Edit cluster labels** to open the **Edit labels** window.
50+
51+
Adding or deleting labels on a folder requires the [Folder Admin]({% link cockroachcloud/authorization.md %}#folder-admin) role.
52+
53+
1. Navigate to the folder on the [**Clusters** page]({% link cockroachcloud/cluster-management.md %}#view-clusters-page) and click the menu button in the **Action** column.
54+
1. In the dropdown menu, select **Edit folder labels** to open the **Edit labels** window.
55+
56+
### Add labels
57+
58+
To add a label in the **Edit labels** window:
59+
60+
1. Enter a label key and an optional label value. Autocomplete helps avoid typos and duplicates.
61+
1. Click **+ Add**. The label appears under **Labels applied**.
62+
1. Repeat steps 1 and 2 to add more labels.
63+
1. Click **Add/Update Labels** to apply the changes. A success or failure notification will appear at the top right.
64+
65+
### Delete labels
66+
67+
To delete a label in the **Edit labels** window:
68+
69+
1. Under **Labels applied**, click the **X** on the right of the label you want to delete.
70+
1. Repeat step 1 to delete more labels.
71+
1. Click **Update Labels** to apply the changes. A success or failure notification will appear at the top right.
72+
73+
To change a label, delete the existing label and add a new one.
74+
75+
## Cost and billing integration
76+
77+
Labels appear in invoices on the [**Billing** page]({% link cockroachcloud/billing-management.md %}#view-credits-balance).
78+
79+
## Best Practices
80+
81+
- Define a consistent labeling taxonomy (e.g., `team`, `env`, `app`) across your organization.
82+
- Use autocomplete in the console to prevent the duplication of keys.
83+
- Regularly review and remove unused or outdated labels.

src/current/releases/cloud.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ Get future release notes emailed to you:
1414

1515
{% include marketo.html formId=1083 %}
1616

17+
## April 30, 2025
18+
19+
You can now use the CockroachDB {{ site.data.products.cloud }} Console to [edit the labels of a cluster or folder]({% link cockroachcloud/labels.md %}).
20+
1721
## April 3, 2025
1822

1923
You can now [change cluster plans between {{ site.data.products.basic }} and {{ site.data.products.standard }}]({% link cockroachcloud/change-plan-between-basic-and-standard.md %}) from the CockroachDB {{ site.data.products.cloud }} Console.

0 commit comments

Comments
 (0)