Skip to main content
Version: 3.1

async-rancher-projects

Prerequisites

  • Stork version 2.11.2 or newer.
  • All the Rancher projects are created on both the source and the destination cluster.

Create project mapping

While creating the ClusterPair, use the argument --project-mappings to indicate how projectIDs on the source cluster should map to projectIDs on the destination cluster. Project mappings are provided as comma-separated key-value pairs.

For example:

storkctl generate clusterpair -n <migrationnamespace> <remotecluster> --project-mappings  <projectID-A1>=<projectID-A2>,<projectID-B1>: <projectID-B2>

In this example, projectID-A1 on source cluster maps to projectID-A2 on the destination cluster, while projectID-B1 on the source cluster maps to projectID-B2 on the destination cluster.

Include ClusterIDs in project mappings (Optional)

For the projectIDs, you can also include clusterID prefixes in project mappings. Including clusterID prefixes ensures precise mapping, especially in scenarios with multiple clusters.

For example:

storkctl generate clusterpair \
-n <migrationnamespace> <remotecluster> \
--project-mappings \
p-58q4n=p-jjk2q c-m-wthc7l5q:p-58q4n=c-m-5sftdjns:p-jjk2q

In the above example, there are following two mappings:

  • A mapping with clusterIDs: c-m-wthc7l5q:p-58q4n containing the source clusterID c-m-wthc7l5q will map to c-m-5sftdjns:p-jjk2q containing the destination clusterID c-m-5sftdjns.
  • A mapping without the clusterIDs: p-58q4n will map to p-jjk2q.

To view the information, click on the respective tabs, which provide details on how the projectIDs on the source cluster correlate with projectIDs on the destination cluster during resource migration.

spec:
platformOptions:
rancher:
projectMappings:
c-m-wthc7l5q:p-58q4n: c-m-5sftdjns:p-jjk2q
c-m-wthc7l5q:p-dmx28: c-m-5sftdjns:p-6nk5r
c-m-wthc7l5q:p-hvxqm: c-m-5sftdjns:p-7cx4c
c-m-wthc7l5q:p-fkth5: c-m-5sftdjns:p-w5z2s
p-58q4n: p-jjk2q
p-dmx28: p-6nk5r
p-hvxqm: p-7cx4c
p-xz4pd: p-fg5sd