Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ include::modules/migration-writing-ansible-playbook-hook.adoc[leveloffset=+2]
include::modules/migration-changing-migration-plan-limits.adoc[leveloffset=+1]
include::modules/migration-excluding-resources.adoc[leveloffset=+1]
include::modules/migration-enabling-pv-resizing-dvm.adoc[leveloffset=+1]
include::modules/migration-enabling-cached-kubernetes-clients.adoc[leveloffset=+1]

:advanced-migration-options-3-4!:
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ include::modules/migration-writing-ansible-playbook-hook.adoc[leveloffset=+2]
include::modules/migration-changing-migration-plan-limits.adoc[leveloffset=+1]
include::modules/migration-excluding-resources.adoc[leveloffset=+1]
include::modules/migration-enabling-pv-resizing-dvm.adoc[leveloffset=+1]
include::modules/migration-enabling-cached-kubernetes-clients.adoc[leveloffset=+1]
44 changes: 44 additions & 0 deletions modules/migration-enabling-cached-kubernetes-clients.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// 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-enabling-cached-kubernetes-clients_{context}"]
= Enabling cached Kubernetes clients

You can enable cached Kubernetes clients in the `MigrationController` custom resource (CR) for improved performance during migration. The greatest performance benefit is displayed when migrating between clusters in different regions or with significant network latency.

[NOTE]
====
Delegated tasks, for example, Rsync backup for direct volume migration or Velero backup and restore, however, do not show improved performance with cached clients.
====

Cached clients require extra memory because the `MigrationController` CR caches all API resources that are required for interacting with `MigCluster` CRs. Requests that are normally sent to the API server are directed to the cache instead. The cache watches the API server for updates.

You can increase the memory limits and requests of the `MigrationController` CR if `OOMKilled` errors occur after you enable cached clients.

.Procedure

. Enable cached clients by running the following command:
+
[source,terminal]
----
$ oc -n openshift-migration patch migrationcontroller migration-controller --type=json --patch \
'[{ "op": "replace", "path": "/spec/mig_controller_enable_cache", "value": true}]'
----

. Optional: Increase the `MigrationController` CR memory limits by running the following command:
+
[source,terminal]
----
$ oc -n openshift-migration patch migrationcontroller migration-controller --type=json --patch \
'[{ "op": "replace", "path": "/spec/mig_controller_limits_memory", "value": <10Gi>}]'
----

. Optional: Increase the `MigrationController` CR memory requests by running the following command:
+
[source,terminal]
----
$ oc -n openshift-migration patch migrationcontroller migration-controller --type=json --patch \
'[{ "op": "replace", "path": "/spec/mig_controller_requests_memory", "value": <350Mi>}]'
----