CoreWeave sandboxes are in public preview. For access, contact your CoreWeave account team, CoreWeave Support, or email support@coreweave.com.
Before you begin
Before you configure budgets, complete the following prerequisites:- Confirm with CoreWeave that Node allocation budget support and its required permissions are enabled for your cluster.
- Apply any required managed runner update and wait for the runner to become ready and connected.
- Use CoreWeave Intelligent CLI v1.44.0 or later, authenticated to the correct organization with Sandbox administrator permissions.
- Install
jq. - Have Kubernetes access to inspect Node labels and published budgets. Before you decrease a budget, you also need permission to cordon and uncordon the affected Nodes.
- Use the default Kubernetes scheduler, or confirm that your scheduler enforces the budget extended resources.
- If sandboxes select a RuntimeClass, confirm with your cluster administrator that it declares a nonempty
overhead.podFixedmap. A runtime with no overhead must declare explicit zero values. Sandboxes without a RuntimeClass don’t require this setting.
Identify the runner and Node labels
Identify the runner to update and the Node labels to use in your budget selectors. List available runners:[CLUSTER-ID] with your CoreWeave Kubernetes Service (CKS) cluster ID:
[RUNNER-ID] with the runner ID and [KUBE-CONTEXT] with its Kubernetes context:
Use the label keys and values present in your cluster.
A budget selector selects Kubernetes Nodes. It doesn’t select API runner groups or override sandbox placement constraints, taints, tolerations, or RuntimeClasses.
Create a budget configuration
Save one of the following examples as thenode-budget.json file.
Start with "mode": "prepare". Preparation publishes budget resources. Enforcement is enabled in a later step.
95% CPU and memory on every Node
An empty selector matches all Nodes.0 through 100. A value of 0 means zero sandbox capacity.
50% on selected Node Pools only
This selects Nodes in either of two Node Pools. Replace[BATCH-POOL] and [INTERACTIVE-POOL] with their Node Pool label values:
managedNodes.selector receive zero sandbox budget. Once enforcement is enabled, sandboxes that require budget tokens can’t use those Nodes.
Preview the selection:
Different budgets for Node Pools and custom groups
This configuration provides the following budgets:- 95% CPU and memory by default.
- 50% CPU and memory for Nodes in the
[CPU-POOL]Node Pool. - 25% CPU and 40% memory for Nodes labeled
[BUDGET-GROUP-LABEL]=[TRAINING-GROUP].
[CPU-POOL] with the Node Pool label value. Replace [BUDGET-GROUP-LABEL] with a custom label key and [TRAINING-GROUP] with its value.
- A matching override replaces the default percentages.
- If multiple overrides match, the minimum percentage in each dimension wins.
- Rule order doesn’t establish priority.
- Overlap is reported as
selector_conflict. Prefer disjoint groups when overlap is unintended. - Entries in
matchLabelsand separate expressions must all match. - Values within one
Inexpression are alternatives.
50% on specific Nodes
Replace[HOSTNAME-A] and [HOSTNAME-B] with the observed kubernetes.io/hostname label values for the Nodes you want to select:
Apply the configuration
Store the configuration as a JavaScript Object Notation (JSON)string in the following field:
BUDGET_FILE to apply a different configuration:
spec.overrides is replaced as an object, so preserving its sibling fields is necessary.
For CoreWeave Intelligent CLI v1.44.0, use this environment-only patch. That release’s older policy schema can’t fully export the renamed HTTPS hostname fields from newer servers. If you reapply a full runner document, you could therefore replace its policy with incomplete data. The preceding patch doesn’t include or update the policy.
Keep runner exports private and remove temporary files afterward:
Verify preparation
Preparation publishes these extended resources on Node status:- Existing bound sandboxes without budget tokens are subtracted from the published budget until they finish.
- Other workloads consume physical resources, so available sandbox capacity can be lower than the configured budget.
- Sandbox charges include helper containers, init-container peaks, and RuntimeClass overhead.
- CPU and memory percentages don’t divide GPU capacity.
sandbox_runner_node_budget_policy metric exposes mode and policy_hash labels. Check that every runner in the cluster reports mode="prepare" and the same policy_hash value. If you don’t have access to these metrics, ask CoreWeave to verify readiness before enabling enforcement.
Enable enforcement
After preparation is healthy, change only the mode:cwic sandbox runner describe "$RUNNER_ID" to check the runner rollout, and ask CoreWeave to confirm the cluster admission transition is complete. This transition coordinates when the cluster starts enforcing budgets. It includes retiring old shards and allowing pending workloads from before enforcement to bind or terminate.
To verify enforcement, complete the following steps:
- Create a small sandbox on each runner.
- Confirm its Pod requests both budget resources.
- If you perform a controlled saturation test, verify that new allocations stop when either the CPU or memory budget is exhausted.
- Delete the test sandboxes.
Configure Terraform-managed runners
If Terraform manages the runner, merge the followingspec.overrides.env setting into its existing coreweave_sandbox_managed_runner resource:
prepare to enforce and apply the corresponding Terraform change.
If Terraform manages the runner, keep changes in Terraform so subsequent applies retain the intended configuration.
Reduce budgets or change Node membership
Nodes aren’t automatically cordoned or drained. Before you reduce percentages or change selectors or labels in a way that reduces capacity, complete the following steps:- Cordon the affected Nodes.
- Apply the updated configuration to every runner in that cluster.
- Wait for budget convergence.
- Uncordon only the Nodes you cordoned for this change.