Migrating from kube-system to cex-device-plugin namespace
This section describes how to move the CEX device plug-in from the
kube-system namespace to its own namespace
cex-device-plugin.
Migration details
You must log in as a user that belongs to a role with administrative privileges for the cluster.
For example, system:admin or kube:admin.
The migration basically corresponds to a reinstallation of the CEX device plug-in and the
corresponding CEX resource configuration in the new cex-device-plugin
namespace.
kube-system namespace. This leads to a short
interruption in service such that pods with containers that are requesting a CEX resource cannot be
scheduled. Already running containers with allocated CEX resources will not be affected and continue
to run.To help the migration, download the deployment kustomize files from the CEX
device plug-in github repository and change to the download directory. With these files you
can install the CEX devce plug-in with a custom configuration in the new namespace
cex-device-plugin.
The configuration map is the only part that has to be moved. Everything else can simply be
deleted in the kube-system namespace and freshly installed in the
cex-device-plugin namespace. The kustomize templates for installation can be used
to directly install the CEX device plug-in with a custom configmap.
Migration sequence
Follow these steps for migration:
- Download the deployment Kustomize files from the CEX device plug-in github repository and change into the download directory.
- Copy the
cex_resources.jsonfile content that is contained in the configuration map in thekube-systemnamespace intodeployments/configmap/cex_resources.jsonby running the following command:oc get cm -n kube-system cex-resources-config -o jsonpath="{.data['cex_resources\.json']}" > deployments/configmap/cex_resources.json - Remove the old CEX device plug-in daemonset from the
kube-systemnamespace by running the following command:oc delete daemonset cex-plugin-daemonset -n kube-systemNow, no new pods with containers requesting CEX devices can be created anymore.
- Create the installation template by running the following
command:
oc create -k deployments/rhocp-createAfter successful installation, new pods with containers requesting CEX devices can be created and the CEX device plug-in should be fully functional again.
- Optionally, the
cex-resources-configConfigMap in thekube-systemnamespace can be cleaned up. It is no longer needed since the new copy in thecex-device-pluginnamespace is used. To delete the old ConfigMap, run the following command:oc delete cm cex-resources-config -n kube-system