Migration and MigrationSchedule


Synchronous and asynchronous disaster recovery (DR) involves migrating Kubernetes resources from a source cluster to a destination cluster. To set up a migration, you need to pair the source and destination clusters, and then set up a migration schedule to migrate the Kubernetes resources. This document explains the fields that can be used to set up successful migration schedules between the clusters as per your requirements.

MigrationSchedule schema

Field Description Type Optional Default
clusterPair Specifies the name of the ClusterPair to be used for the migration. string No NA
adminClusterPair Specifies the name of the admin ClusterPair used to migrate resources scoped for the cluster, if the ClusterPair is present in a non-admin namespace. string Yes NA
namespaces Specifies the list of namespaces to be included in the migration. string No

Yes (From Stork version 23.5.0)
NA
namespaceSelectors When set, resources in the namespaces with the specified namespace labels will be migrated. All the labels provided in this option will be OR’ed. Note that this parameter is only supported on Stork version 23.5.0 and newer. map [string] string Yes NA
ignoreOwnerReferencesCheck When set, resources with ownerReferences will also be migrated, even if the corresponding owners are getting migrated. Note that this parameter is only supported on Stork version 23.5.0 and newer. boolean Yes false
includeResources Specifies whether Kubernetes resources should be migrated. boolean Yes true
includeVolumes Specifies whether the underlying Portworx volumes should be migrated. boolean Yes true
startApplications Specifies whether the applications should be scaled up on the target cluster after a successful migration. boolean Yes false
purgeDeletedResources If Kubernetes resources are removed from the source cluster, this flag specifies to delete them from the target cluster. boolean Yes false
skipServiceUpdate Specifies whether service objects should be skipped during migration. boolean Yes false
includeNetworkPolicyWithCIDR Specifies whether the underlying network policies should be migrated even if a fixed CIDR is present on them. boolean Yes False
selectors When set, only resources with the provided labels will be migrated. All the labels provided in this option will be OR’ed. map [string] string Yes NA
excludeSelectors When set, resources with these labels will be excluded from migration. All the labels provided in this option will be OR’ed. Note that this parameter is only supported on Stork version 23.4.0 and newer. map [string] string Yes NA
preExecRule Specifies the name of the rule to be executed before every migration is triggered. string Yes NA
postExecRule Specifies the name of the rule to be executed after every migration is triggered. string Yes NA
includeOptionalResourceTypes Set this flag to ensure that the Kubernetes resources associated with Job are migrated. By default, the Job resources are not migrated. []string Yes NA
skipDeletedNamespaces Specifies if migration should ignore deleted namespaces during migration. If set to false, Stork will fail the migration when it encounters a namespace that is deleted but specified in the namespaces field. boolean Yes true
transformSpecs Specifies the ResourceTransformation spec to be applied during migration. []string Yes NA
NOTE: You must specify either the namespaces or the namespaceSelectors parameter.


Last edited: Thursday, Jun 1, 2023