Migrating CRs to the internal.nvke.nvidia.com group
The management-engine’s internal API group changed from internal.nke.nvidia.com
to internal.nvke.nvidia.com, and its cluster kind from NKECluster to
NVKECluster, as part of the rename to NVKE.
A group change is a new CRD, not an edit. There is no conversion webhook and no automatic migration: the new CRDs install alongside the old ones, and the old custom resources stay where they are until you copy them across. A site that upgrades without doing this comes up with a management-engine that sees no clusters and no releases.
New installs need none of this. The procedure below is for an existing site.
What moves
Only the cluster kind is renamed. The other four keep their names and change group only.
The finalizer internal.nke.nvidia.com/cluster-cleanup becomes
internal.nvke.nvidia.com/cluster-cleanup. You do not add the new one by hand —
the controller sets it on first reconcile.
Before you start
- Take a backup of the old resources. Step 2 writes one, and it is the only copy once step 6 deletes the originals.
jqand akubectlthat can reach the management cluster.- Know your NVKECluster namespaces. The examples use
--all-namespaces.
Status matters.
NVKECluster.status.provisioningpins a cluster to the CWE cluster it created:endpointis the service that provisioned it andidis its UUID. The reconciler falls back to a lookup by name when the status is absent, so a lost status does not by itself double-provision — butidis also what stops a deleted cluster being silently replaced by a new one at the same name. Copy the status. Step 4 does.
Procedure
1. Stop the management-engine
Two controllers reconciling the same clusters through different CRDs will fight.
The cloud-workflow-engine (CWE) chart is also affected: it reads the
machineimages, clusterreleases and nodepoolreleases CRs to resolve
release names, and its RBAC now grants only the new group. Until step 3 has
applied the releases, a CWE running the new chart sees no releases and
cannot resolve a release for new provisioning. Existing tenant clusters are
not touched. So:
- Run steps 1–5 before, or in the same maintenance window as, the chart upgrade, and install the new CRDs first (the chart does this; do not upgrade a site’s CWE and leave it for later).
- Do not create, resize or upgrade tenant clusters from the chart upgrade until step 5 is clean.
2. Export the existing resources
Confirm the export is not empty before going further:
3. Rewrite and apply the specs
jq drops the server-owned metadata that cannot be re-applied — uid,
resourceVersion, generation, creationTimestamp, managedFields,
selfLink — and the old finalizer, which would otherwise be carried onto an
object whose controller never set it. It also drops
kubectl.kubernetes.io/last-applied-configuration, which describes the old
group, and rewrites annotation keys from the old group prefix to the new one.
The release CRs carry internal.nke.nvidia.com/machine-init-kubernetes-version
and ...-injected; the controller reads them under the new prefix, so a copy
that kept the old keys would silently lose which Kubernetes versions each
release supports.
Apply the releases first: a cluster resolves its release channel on reconcile, and a channel that is not there yet reconciles to a failure you then have to clear.
4. Restore the status subresources
kubectl apply does not write a status subresource. Patch each one from the
backup.
ClusterReleaseChannel has no status subresource and is skipped.
Do this while the management-engine is still scaled to zero (step 1). A merge patch cannot remove fields a running controller has already written, so restoring status after it starts could leave a partial status.
5. Verify before deleting anything
Counts match, and every cluster kept its provisioning identity:
Every row must carry the same UUID as the matching row in nkeclusters.json. An
empty id on a cluster that had one means step 4 did not land — fix it before
continuing, not after.
Release annotations carried across under the new prefix, and none under the old one (both commands should list each release with its version annotations, and the second should print nothing):
Bring the controller back and let it reconcile:
Each NVKECluster should reach Ready and pick up the new finalizer:
No tenant cluster should restart, re-provision or change state. If one does,
stop and restore from crd-group-backup rather than letting reconciliation run on.
6. Remove the old resources
Only once step 5 is clean. The old controller is gone, so nothing will remove the old finalizers — strip them first or the delete hangs forever.
Deleting the old CRDs deletes the custom resources with them:
The chart marks these CRDs helm.sh/resource-policy: keep, so a Helm upgrade
will not remove them for you. This step is deliberate and manual.
Keep crd-group-backup until the site has run a full provisioning cycle on the
new group.
Rollback
Before step 6, rollback is: scale the management-engine to zero, delete the new CRs, reinstall the previous chart, scale back up. The old CRs were never touched.
After step 6 the old CRDs are gone and rollback means re-installing the previous
chart and replaying crd-group-backup through the same procedure in reverse. This
is why step 5 verifies before step 6 deletes.