Migrating FRR-K8s resources
Migrating FRR-K8s custom resources is required when upgrading from OpenShift Container Platform 4.17 or earlier with the MetalLB Operator deployed. Existing FRRConfiguration resources in the metallb-system namespace must be moved to the openshift-frr-k8s namespace to align with the updated architecture. Learn how to migrate these resources using the CLI and how to verify that the migration completed successfully.
All user-created FRR-K8s custom resources (CRs) in the metallb-system namespace under OpenShift Container Platform 4.17 and earlier releases must be migrated to the openshift-frr-k8s namespace. As a cluster administrator, you can migrate your FRR-K8s custom resources to the openshift-frr-k8s namespace using the CLI.
Migrating FRR-K8s resources
You can migrate the FRR-K8s FRRConfiguration custom resources from the metallb-system namespace to the openshift-frr-k8s namespace.
When upgrading from an earlier version of OpenShift Container Platform with the Metal LB Operator deployed, you must manually migrate your custom FRRConfiguration configurations from the metallb-system namespace to the openshift-frr-k8s namespace.
Prerequisites
- You have installed the OpenShift CLI (
oc). - You are logged in to the cluster as a user with the
cluster-adminrole.
Procedure
- To create the
openshift-frr-k8snamespace, enter the following command:$ oc create namespace openshift-frr-k8s - To automate the migration, create a shell script named
migrate.shwith the following contents:#!/bin/bashOLD_NAMESPACE="metallb-system"NEW_NAMESPACE="openshift-frr-k8s"FILTER_OUT="metallb-"oc get frrconfigurations.frrk8s.metallb.io -n "${OLD_NAMESPACE}" -o json |\jq -r '.items[] | select(.metadata.name | test("'"${FILTER_OUT}"'") | not)' |\jq -r '.metadata.namespace = "'"${NEW_NAMESPACE}"'"' |\oc create -f - - To execute the migration, run the following command:
$ bash migrate.sh
Verification
- To confirm that the migration succeeded, run the following command:
$ oc get frrconfigurations.frrk8s.metallb.io -n openshift-frr-k8s
After the migration is complete, you can remove the FRRConfiguration custom resources from the metallb-system namespace.