Skip to content

Commit af9c717

Browse files
paulohtb6Feediver1
andauthored
rpk: add rpk shadow reference (#1466)
Co-authored-by: Joyce Fee <[email protected]>
1 parent 3bae8a1 commit af9c717

File tree

15 files changed

+542
-10
lines changed

15 files changed

+542
-10
lines changed

modules/ROOT/nav.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,15 @@
474474
***** xref:reference:rpk/rpk-security/rpk-security-user-delete.adoc[]
475475
***** xref:reference:rpk/rpk-security/rpk-security-user-update.adoc[]
476476
***** xref:reference:rpk/rpk-security/rpk-security-user-list.adoc[]
477+
*** xref:reference:rpk/rpk-shadow/rpk-shadow.adoc[]
478+
**** xref:reference:rpk/rpk-shadow/rpk-shadow-config-generate.adoc[]
479+
**** xref:reference:rpk/rpk-shadow/rpk-shadow-create.adoc[]
480+
**** xref:reference:rpk/rpk-shadow/rpk-shadow-delete.adoc[]
481+
**** xref:reference:rpk/rpk-shadow/rpk-shadow-describe.adoc[]
482+
**** xref:reference:rpk/rpk-shadow/rpk-shadow-failover.adoc[]
483+
**** xref:reference:rpk/rpk-shadow/rpk-shadow-list.adoc[]
484+
**** xref:reference:rpk/rpk-shadow/rpk-shadow-status.adoc[]
485+
**** xref:reference:rpk/rpk-shadow/rpk-shadow-update.adoc[]
477486
*** xref:reference:rpk/rpk-topic/rpk-topic.adoc[]
478487
**** xref:reference:rpk/rpk-topic/rpk-topic-add-partitions.adoc[]
479488
**** xref:reference:rpk/rpk-topic/rpk-topic-alter-config.adoc[]

modules/get-started/pages/release-notes/redpanda.adoc

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Redpanda v25.3 introduces xref:deploy:redpanda/manual/disaster-recovery/shadowin
1919

2020
The shadow cluster operates in read-only mode while continuously receiving updates from the source cluster. During a disaster, you can failover individual topics or an entire shadow link to make resources fully writable for production traffic. See xref:deploy:redpanda/manual/disaster-recovery/shadowing/failover-runbook.adoc[] for emergency procedures.
2121

22+
2223
== Connected client monitoring
2324

2425
You can view details about Kafka client connections using `rpk` or the Admin API ListKafkaConnections endpoint. This allows you to view detailed information about active client connections on a cluster, and identify and troubleshoot problematic clients. For more information, see the xref:manage:cluster-maintenance/manage-throughput.adoc#view-connected-client-details[connected client details] example in the Manage Throughput guide.
@@ -49,10 +50,23 @@ You can now generate a security report for your Redpanda cluster using the link:
4950

5051
Redpanda v25.3 implements topic identifiers using 16 byte UUIDs as proposed in https://cwiki.apache.org/confluence/display/KAFKA/KIP-516%3A+Topic+Identifiers[KIP-516^].
5152

52-
== New rpk commands
53+
== New commands
54+
55+
Redpanda v25.3 introduces new xref:reference:rpk/rpk-shadow/rpk-shadow.adoc[`rpk shadow`] commands for managing Redpanda shadow links:
56+
57+
* xref:reference:rpk/rpk-shadow/rpk-shadow-config-generate.adoc[`rpk shadow config generate`] - Generate configuration files for shadow links
58+
* xref:reference:rpk/rpk-shadow/rpk-shadow-create.adoc[`rpk shadow create`] - Create new shadow links
59+
* xref:reference:rpk/rpk-shadow/rpk-shadow-update.adoc[`rpk shadow update`] - Update existing shadow link configurations
60+
* xref:reference:rpk/rpk-shadow/rpk-shadow-list.adoc[`rpk shadow list`] - List all shadow links
61+
* xref:reference:rpk/rpk-shadow/rpk-shadow-describe.adoc[`rpk shadow describe`] - View shadow link configuration details
62+
* xref:reference:rpk/rpk-shadow/rpk-shadow-status.adoc[`rpk shadow status`] - Monitor shadow link replication status
63+
* xref:reference:rpk/rpk-shadow/rpk-shadow-failover.adoc[`rpk shadow failover`] - Perform emergency failover operations
64+
* xref:reference:rpk/rpk-shadow/rpk-shadow-delete.adoc[`rpk shadow delete`] - Delete shadow links
65+
66+
In addition, the following commands have been added:
5367

54-
* **xref:reference:rpk/rpk-cluster/rpk-cluster-connections.adoc[rpk cluster connections]** - Monitor cluster connections and client statistics.
55-
* **xref:reference:rpk/rpk-redpanda/rpk-redpanda-config-print.adoc[rpk redpanda config print]** - Display node configuration.
68+
* xref:reference:rpk/rpk-cluster/rpk-cluster-connections.adoc[`rpk cluster connections`] - Monitor cluster connections and client statistics.
69+
* xref:reference:rpk/rpk-redpanda/rpk-redpanda-config-print.adoc[`rpk redpanda config print`] - Display node configuration.
5670

5771
== Deprecations
5872

modules/manage/pages/disaster-recovery/shadowing/failover-runbook.adoc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ rpk shadow describe <shadow-link-name>
7878
rpk shadow status <shadow-link-name>
7979
----
8080

81+
For detailed command options, see xref:reference:rpk/rpk-shadow/rpk-shadow-list.adoc[`rpk shadow list`], xref:reference:rpk/rpk-shadow/rpk-shadow-describe.adoc[`rpk shadow describe`], and xref:reference:rpk/rpk-shadow/rpk-shadow-status.adoc[`rpk shadow status`].
82+
8183
Verify that the following conditions exist before proceeding with failover:
8284

8385
* Shadow link state should be `ACTIVE`.
@@ -86,7 +88,7 @@ Verify that the following conditions exist before proceeding with failover:
8688

8789
**Understanding replication lag:**
8890

89-
Use `rpk shadow status <shadow-link-name>` to check lag, which shows the message count difference between source and shadow partitions:
91+
Use xref:reference:rpk/rpk-shadow/rpk-shadow-status.adoc[`rpk shadow status`] to check lag, which shows the message count difference between source and shadow partitions:
9092

9193
* **Acceptable lag examples**: 0-1000 messages for low-throughput topics, 0-10000 messages for high-throughput topics
9294
* **Concerning lag examples**: Growing lag over 50,000 messages, or lag that continuously increases without recovering
@@ -106,7 +108,7 @@ rpk shadow status <shadow-link-name> > failover-status-$(date +%Y%m%d-%H%M%S).lo
106108
// TODO: Verify this output format by running actual rpk shadow status command
107109
Example output showing healthy replication before failover:
108110
----
109-
Shadow Link: <shadow-link-name>
111+
shadow link: <shadow-link-name>
110112
111113
Overview:
112114
NAME <shadow-link-name>
@@ -139,6 +141,8 @@ A complete cluster failover is appropriate If you observe that the source cluste
139141
rpk shadow failover <shadow-link-name> --all
140142
----
141143

144+
For detailed command options, see xref:reference:rpk/rpk-shadow/rpk-shadow-failover.adoc[`rpk shadow failover`].
145+
142146
For selective topic failover (when only specific services are affected):
143147

144148
[,bash]
@@ -165,7 +169,7 @@ rpk shadow status <shadow-link-name> --print-topic
165169
// TODO: Verify this output format by running actual rpk shadow status command during failover
166170
Example output during successful failover:
167171
----
168-
Shadow Link: <shadow-link-name>
172+
shadow link: <shadow-link-name>
169173
170174
Overview:
171175
NAME <shadow-link-name>
@@ -217,6 +221,8 @@ After all applications are running normally:
217221
rpk shadow delete <shadow-link-name>
218222
----
219223

224+
For detailed command options, see xref:reference:rpk/rpk-shadow/rpk-shadow-delete.adoc[`rpk shadow delete`].
225+
220226
Document the time of failover initiation and completion, applications affected and recovery times, data loss estimates based on replication lag, and issues encountered during failover.
221227

222228
== Troubleshoot common issues

modules/manage/pages/disaster-recovery/shadowing/failover.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ To fail over a specific shadow topic while leaving other topics in the shadow li
3535
rpk shadow failover <shadow-link-name> --topic <topic-name>
3636
----
3737

38-
Use this approach when you need to selectively failover specific workloads or when testing failover procedures.
38+
Use this approach when you need to selectively failover specific workloads or when testing failover procedures. For detailed command options, see xref:reference:rpk/rpk-shadow/rpk-shadow-failover.adoc[`rpk shadow failover`].
3939

4040
=== Complete shadow link failover (cluster failover)
4141

@@ -88,7 +88,7 @@ Monitor failover progress using the status command:
8888
rpk shadow status <shadow-link-name>
8989
----
9090

91-
The output shows individual topic states and any issues encountered during the failover process.
91+
The output shows individual topic states and any issues encountered during the failover process. For detailed command options, see xref:reference:rpk/rpk-shadow/rpk-shadow-status.adoc[`rpk shadow status`].
9292

9393
**Task states during monitoring:**
9494

modules/manage/pages/disaster-recovery/shadowing/monitor.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ View shadow link configuration details:
2828
rpk shadow describe <my-disaster-recovery-link>
2929
----
3030

31+
For detailed command options, see xref:reference:rpk/rpk-shadow/rpk-shadow-list.adoc[`rpk shadow list`] and xref:reference:rpk/rpk-shadow/rpk-shadow-describe.adoc[`rpk shadow describe`].
32+
3133
This command shows the complete configuration of the shadow link, including connection settings, filters, and synchronization options.
3234

3335
Check your shadow link status to ensure proper operation:
@@ -44,7 +46,7 @@ rpk shadow status <shadow-link-name>
4446
rpk shadow status <shadow-link-name>
4547
----
4648

47-
For troubleshooting specific issues, you can use command options to show individual status sections. See the rpk reference for available status options.
49+
For troubleshooting specific issues, you can use command options to show individual status sections. See xref:reference:rpk/rpk-shadow/rpk-shadow-status.adoc[`rpk shadow status`] for available status options.
4850

4951
The status output includes:
5052

modules/manage/pages/disaster-recovery/shadowing/setup.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ Use `rpk` to generate a sample configuration file with common filter patterns:
276276
rpk shadow config generate --output shadow-config.yaml
277277
----
278278

279-
This creates a template configuration file that you can customize for your environment.
279+
This creates a template configuration file that you can customize for your environment. For detailed command options, see xref:reference:rpk/rpk-shadow/rpk-shadow-config-generate.adoc[`rpk shadow config generate`].
280280

281281
=== Networking
282282

@@ -374,6 +374,8 @@ You can establish a shadow link using either xref:get-started:rpk/index.adoc[`rp
374374
rpk shadow create --config-file shadow-config.yaml
375375
----
376376

377+
For detailed command options, see xref:reference:rpk/rpk-shadow/rpk-shadow-create.adoc[`rpk shadow create`].
378+
377379
=== Update an existing shadow link
378380

379381
If you need to modify a shadow link configuration after creation, use the update command:
@@ -383,6 +385,8 @@ If you need to modify a shadow link configuration after creation, use the update
383385
rpk shadow update <shadow-link-name>
384386
----
385387

388+
For detailed command options, see xref:reference:rpk/rpk-shadow/rpk-shadow-update.adoc[`rpk shadow update`].
389+
386390
This opens your default editor to modify the shadow link configuration. Only changed fields are updated on the server. The shadow link name cannot be changed - you must delete and recreate the link to rename it.
387391

388392
[TIP]
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
= rpk shadow config generate
2+
// tag::single-source[]
3+
4+
Generate a configuration file for creating a shadow link.
5+
6+
By default, this command creates a sample configuration file with placeholder values that you customize for your environment.
7+
8+
Use the `--print-template` flag to generate a configuration template with detailed field documentations.
9+
10+
By default, this command prints the configuration to standard output. Use the `--output` flag to save the configuration to a file.
11+
12+
After you generate the configuration file, update the placeholder values with your actual connection details and settings. Then use xref:reference:rpk/rpk-shadow/rpk-shadow-create.adoc[`rpk shadow create`] to create the shadow link.
13+
14+
== Usage
15+
16+
[,bash]
17+
----
18+
rpk shadow config generate [flags]
19+
----
20+
21+
== Examples
22+
23+
Generate a sample configuration and print it to standard output:
24+
[,bash]
25+
----
26+
rpk shadow config generate
27+
----
28+
29+
Generate a configuration template with all the field documentation:
30+
31+
[,bash]
32+
----
33+
rpk shadow config generate --print-template
34+
----
35+
36+
Save the sample configuration to a file:
37+
38+
[,bash]
39+
----
40+
rpk shadow config generate -o shadow-link.yaml
41+
----
42+
43+
Save the template with documentation to a file:
44+
45+
[,bash]
46+
----
47+
rpk shadow config generate --print-template -o shadow-link.yaml
48+
----
49+
50+
== Flags
51+
52+
[cols="1m,1a,2a"]
53+
|===
54+
|*Value* |*Type* |*Description*
55+
56+
|-o, --output |string |File path identifying where to save the generated configuration file. If not specified, prints to standard output.
57+
58+
|--print-template |- |Generate a configuration template with field documentation instead of a sample configuration.
59+
60+
|-h, --help |- |Help for generate.
61+
62+
|--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`.
63+
64+
|-X, --config-opt |stringArray |Override `rpk` configuration settings. See xref:reference:rpk/rpk-x-options.adoc[`rpk -X`] or execute `rpk -X help` for inline detail or `rpk -X list` for terser detail.
65+
66+
|--profile |string |Profile to use. See xref:reference:rpk/rpk-profile.adoc[`rpk profile`] for more details.
67+
68+
|-v, --verbose |- |Enable verbose logging.
69+
|===
70+
71+
// end::single-source[]
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
= rpk shadow create
2+
// tag::single-source[]
3+
4+
Creates a Redpanda shadow link.
5+
6+
This command creates a shadow link using a configuration file that defines the connection details and synchronization settings.
7+
8+
Before you create a shadow link, generate a configuration file with xref:reference:rpk/rpk-shadow/rpk-shadow-config-generate.adoc[`rpk shadow config generate`] and update it with your source cluster details. The command prompts you to confirm the creation. Use the `--no-confirm` flag to skip the confirmation prompt.
9+
10+
After you create the shadow link, use xref:reference:rpk/rpk-shadow/rpk-shadow-status.adoc[`rpk shadow status`] to monitor the replication progress.
11+
12+
== Usage
13+
14+
[,bash]
15+
----
16+
rpk shadow create [flags]
17+
----
18+
19+
== Examples
20+
21+
Create a shadow link using a configuration file:
22+
23+
[,bash]
24+
----
25+
rpk shadow create --config-file shadow-link.yaml
26+
----
27+
28+
Create a shadow link without a confirmation prompt:
29+
30+
[,bash]
31+
----
32+
rpk shadow create -c shadow-link.yaml --no-confirm
33+
----
34+
35+
== Flags
36+
37+
[cols="1m,1a,2a"]
38+
|===
39+
|*Value* |*Type* |*Description*
40+
41+
|-c, --config-file |string |Path to configuration file to use for the shadow link; use `--help` for details.
42+
43+
|--no-confirm |- |Disable confirmation prompt.
44+
45+
|-h, --help |- |Help for create.
46+
47+
|--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`.
48+
49+
|-X, --config-opt |stringArray |Override `rpk` configuration settings. See xref:reference:rpk/rpk-x-options.adoc[`rpk -X`] or execute `rpk -X help` for inline detail or `rpk -X list` for terser detail.
50+
51+
|--profile |string |Profile to use. See xref:reference:rpk/rpk-profile.adoc[`rpk profile`] for more details.
52+
53+
|-v, --verbose |- |Enable verbose logging.
54+
|===
55+
56+
// end::single-source[]
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
= rpk shadow delete
2+
// tag::single-source[]
3+
4+
Delete a Redpanda shadow link.
5+
6+
This command deletes a shadow link by name. By default, you cannot delete a shadow link that has active shadow topics. Use xref:reference:rpk/rpk-shadow/rpk-shadow-failover.adoc[`rpk shadow failover`] first to deactivate topics before deletion, or use the `--force` flag to delete the shadow link and failover all its active shadow topics.
7+
8+
The command prompts you to confirm the deletion. Use the `--no-confirm` flag to skip the confirmation prompt. The `--force` flag automatically disables the confirmation prompt.
9+
10+
WARNING: Deleting a shadow link with `--force` permanently removes all shadow topics and stops replication. This operation cannot be undone.
11+
12+
== Usage
13+
14+
[,bash]
15+
----
16+
rpk shadow delete [LINK_NAME] [flags]
17+
----
18+
19+
== Examples
20+
21+
Delete a shadow link:
22+
23+
[,bash]
24+
----
25+
rpk shadow delete my-shadow-link
26+
----
27+
28+
Delete a shadow link without confirmation:
29+
30+
[,bash]
31+
----
32+
rpk shadow delete my-shadow-link --no-confirm
33+
----
34+
35+
Force delete a shadow link with active shadow topics:
36+
37+
[,bash]
38+
----
39+
rpk shadow delete my-shadow-link --force
40+
----
41+
42+
== Flags
43+
44+
[cols="1m,1a,2a"]
45+
|===
46+
|*Value* |*Type* |*Description*
47+
48+
|-f, --force |- |If set, forces a delete while there are active shadow topics; disables confirmation prompts as well.
49+
50+
|--no-confirm |- |Disable confirmation prompt.
51+
52+
|-h, --help |- |Help for delete.
53+
54+
|--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`.
55+
56+
|-X, --config-opt |stringArray |Override `rpk` configuration settings. See xref:reference:rpk/rpk-x-options.adoc[`rpk -X`] or execute `rpk -X help` for inline detail or `rpk -X list` for terser detail.
57+
58+
|--profile |string |Profile to use. See xref:reference:rpk/rpk-profile.adoc[`rpk profile`] for more details.
59+
60+
|-v, --verbose |- |Enable verbose logging.
61+
|===
62+
63+
// end::single-source[]

0 commit comments

Comments
 (0)