1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-07 09:46:53 +01:00
Files
openshift-docs/modules/migration-kubernetes-objects.adoc
2021-10-28 10:22:24 +00:00

46 lines
1.4 KiB
Plaintext

// Module included in the following assemblies:
//
// * migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc
// * migration_toolkit_for_containers/advanced-migration-options-mtc.adoc
[id="migration-kubernetes-objects_{context}"]
= Migrating Kubernetes objects
You can perform a one-time migration of Kubernetes objects that constitute an application's state.
[NOTE]
====
After migration, the `closed` parameter of the `MigPlan` CR is set to `true`. You cannot create another `MigMigration` CR for this `MigPlan` CR.
====
You add Kubernetes objects to the `MigPlan` CR by using one of the following options:
* Adding the Kubernetes objects to the `includedResources` section.
* Using the `labelSelector` parameter to reference labeled Kubernetes objects.
* Adding Kubernetes objects to the `includedResources` section and then filtering them with the `labelSelector` parameter, for example, `Secret` and `ConfigMap` resources with the label `app: frontend`.
.Procedure
* Update the `MigPlan` CR:
+
[source,yaml]
----
apiVersion: migration.openshift.io/v1alpha1
kind: MigPlan
metadata:
name: <migplan>
namespace: openshift-migration
spec:
includedResources:
- kind: <kind> <1>
group: ""
- kind: <kind>
group: ""
...
labelSelector:
matchLabels:
<label> <2>
----
<1> Specify the Kubernetes object, for example, `Secret` or `ConfigMap`.
<2> Specify the label of the resources to migrate, for example, `app: frontend`.