From 0f4f5e099eaeb2a0e63511dc77dc397519641056 Mon Sep 17 00:00:00 2001 From: David Yu Date: Mon, 13 Jul 2026 23:37:40 -0700 Subject: [PATCH] Document cross-namespace clusterRef for shadow links in Kubernetes The Redpanda Operator now supports an optional namespace field on clusterRef (redpanda-operator#1562, backported in #1663), so a ShadowLink can reference a source cluster in a different namespace on the same Kubernetes cluster. Add an example and state that this topology is for development and testing only; production disaster recovery should place source and shadow clusters in separate Kubernetes clusters and cloud regions. Co-Authored-By: Claude Fable 5 --- .../shadowing/k-shadow-linking.adoc | 33 +++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/modules/manage/pages/kubernetes/shadowing/k-shadow-linking.adoc b/modules/manage/pages/kubernetes/shadowing/k-shadow-linking.adoc index e95664ad09..cf6f3c3f49 100644 --- a/modules/manage/pages/kubernetes/shadowing/k-shadow-linking.adoc +++ b/modules/manage/pages/kubernetes/shadowing/k-shadow-linking.adoc @@ -70,10 +70,39 @@ The operator automatically resolves cluster connection details from the referenc + [NOTE] ==== -When using `clusterRef`, the operator handles authentication automatically using the cluster's internal credentials. For cross-namespace or external clusters, use `staticConfiguration` instead. +When using `clusterRef`, the operator handles authentication automatically using the cluster's internal credentials. For clusters that are not managed by the same operator, use `staticConfiguration` instead. +==== ++ +By default, a `clusterRef` resolves in the same namespace as the `ShadowLink` resource. Starting in Redpanda Operator v26.1.9, if the source and shadow clusters are managed by the same operator but deployed in different namespaces on the same Kubernetes cluster, you can set the `namespace` field on the source cluster's `clusterRef`: ++ +.`shadowlink.yaml` +[,yaml] +---- +apiVersion: cluster.redpanda.com/v1alpha2 +kind: ShadowLink +metadata: + name: disaster-recovery-link +spec: + shadowCluster: + clusterRef: + name: redpanda-shadow + sourceCluster: + clusterRef: + name: redpanda-source + namespace: + topicMetadataSyncOptions: + autoCreateShadowTopicFilters: + - name: '*' + filterType: include + patternType: literal +---- ++ +[WARNING] +==== +Use this same-cluster, cross-namespace topology only for development and testing, such as rehearsing replication and failover on a single Kubernetes cluster. A single Kubernetes cluster is a single failure domain, so it cannot provide disaster recovery. For production, deploy the source and shadow clusters in separate Kubernetes clusters, ideally in separate cloud regions, and connect them using `staticConfiguration`. ==== -- For external or cross-namespace clusters, use `staticConfiguration`: +- For external clusters, or clusters that are not managed by the same operator, use `staticConfiguration`: + Create a shadow link with explicit connection details: +