CoreWeave Upgrade & Migration
Community-contributed. Not affiliated with, endorsed by, or sponsored by CoreWeave, Inc. CoreWeave is a registered trademark of CoreWeave, Inc.
Overview
CoreWeave is a GPU-specialized cloud provider running Kubernetes-native infrastructure. Migrations involve upgrading between GPU instance types (A100 to H100), updating CUDA driver versions, and handling Kubernetes API version changes across namespaces. Tracking API versions is critical because CoreWeave's instance type labels and resource quotas change between platform releases, and deploying to a deprecated instance class will cause scheduling failures.
Version Detection
import { KubeConfig, CoreV1Api } from "@kubernetes/client-node";
async function detectCoreWeaveVersion(): Promise<void> {
const kc = new KubeConfig();
kc.loadFromDefault();
const k8sApi = kc.makeApiClient(CoreV1Api);
const pods = await k8sApi.listNamespacedPod("my-namespace");
for (const pod of pods.body.items) {
const gpuClass = pod.spec?.nodeSelector?.["gpu.nvidia.com/class"];
const cudaVersion = pod.metadata?.labels?.["cuda-version"];
console.log(`Pod ${pod.metadata?.name}: GPU=${gpuClass}, CUDA=${cudaVersion}`);
}
const deprecated = ["A100_PCIE_40GB", "V100_PCIE_16GB", "RTX_A5000"];
const activeGpus = pods.body.items
.map((p) => p.spec?.nodeSelector?.["gpu.nvidia.com/class"])
.filter(Boolean);
const stale = activeGpus.filter((g) => deprecated.includes(g!));
if (stale.length > 0) console.warn(`Deprecated GPU types in use: ${stale.join(", ")}`);
}
Migration Checklist
Schema Migration
interface DeploymentMigration {
oldSelector: Record<string, string>;
newSelector: Record<string, string>;
cudaMinVersion: string;
}
const GPU_MIGRATIONS: DeploymentMigration[] = [
{
oldSelector: { "gpu.nvidia.com/class": "A100_PCIE_80GB" },
newSelector: { "gpu.nvidia.com/class": "H100_SXM5_80GB" },
cudaMinVersion: "12.4",
},
{
oldSelector: { "gpu.nvidia.com/class": "A100_SXM4_80GB" },
newSelector: { "gpu.nvidia.com/class": "H100_SXM5_80GB" },
cudaMinVersion: "12.4",
},
];
function migrateNodeSelector(manifest: any, migration: DeploymentMigration): any {
const selector = manifest.spec?.template?.spec?.nodeSelector;
if (!selector) return manifest;
( [key, oldVal] .(migration.)) {
(selector[key] === oldVal) {
selector[key] = migration.[key];
}
}
manifest;
}
Rollback Strategy
import { AppsV1Api, KubeConfig } from "@kubernetes/client-node";
async function rollbackDeployment(namespace: string, name: string): Promise<void> {
const kc = new KubeConfig();
kc.loadFromDefault();
const appsApi = kc.makeApiClient(AppsV1Api);
const deployment = await appsApi.readNamespacedDeployment(name, namespace);
const currentRevision = deployment.body.metadata?.annotations?.["deployment.kubernetes.io/revision"];
console.log(`Rolling back ${name} from revision ${currentRevision}`);
await appsApi.patchNamespacedDeployment(name, namespace, {
spec: { template: { metadata: { annotations: { "kubectl.kubernetes.io/restartedAt": new Date().toISOString() } } } },
}, undefined, , , , , { : { : } });
.();
}
Error Handling
| Migration Issue | Symptom | Fix |
|---|
| GPU class not schedulable | Pod stuck in Pending with Insufficient nvidia.com/gpu | Verify instance type exists in target region; check quota |
| CUDA version mismatch | Container crashes with CUDA driver version is insufficient | Rebuild container with CUDA matching target GPU driver |
| Namespace quota exceeded | Forbidden: exceeded quota on deployment | Request quota increase for new instance type via CoreWeave dashboard |
| PVC migration failure | VolumeAttachment timeout on new node | Detach old PVC, recreate in target availability zone |
| API version deprecated | no matches for kind "Deployment" in version "extensions/v1beta1" | Update manifest to apps/v1 and adjust spec fields |
Resources
Next Steps
For CI/CD pipeline integration, see coreweave-ci-integration.