Skip to main content
A managed runner is the CoreWeave-managed component that runs sandboxes inside your CKS cluster. This page covers the full lifecycle: deployment, health checks, configuration changes as your needs change, and removal when you no longer need the runner. For a walkthrough from enabling a runner to running your first sandbox, see Use your own compute. To manage a runner as infrastructure as code, see Manage runners with Terraform for provider setup and the full Terraform lifecycle.

Before you begin

The CLI, curl, and Terraform examples on this page authenticate with a CoreWeave API access token. Generate one from the Tokens page in the cloud console and copy the Token Secret value. For more on tokens, see Manage API access tokens. CLI: install the CoreWeave Intelligent CLI (cwic), then run cwic auth login and paste the token when prompted. The CLI stores the token locally using its configured credential storage backend. Subsequent commands read it automatically. You don’t need to set an environment variable.
curl: export the token in your shell so the examples on this page can pick it up. Replace API_ACCESS_TOKEN with your CoreWeave API access token:
Terraform: install Terraform and the CoreWeave Terraform provider, and use a token with sandbox_admin permission. The deployment example uses provider 0.26.0 or later in the 0.x series. Set the provider’s authentication variable from the token exported in the previous shell command:
If your cluster already has a runner, import it into Terraform state before applying.

Runner commands

The cwic sandbox runner group manages runners. The following table maps each lifecycle task to the command that performs it. Later sections walk through these commands in context. All input accepts YAML or JSON.

Deploy a runner

Within your organization, each CKS cluster hosts at most one managed runner. To deploy a runner, supply the following details:
  • Runner ID: a client-assigned human-readable ID, unique within your organization.
  • Zone: the geographic zone the cluster belongs to.
  • Cluster ID: which CKS cluster the runner runs on. Find the ID on the Clusters page in the cloud console.
  • Policy: the rules the runner enforces for sandboxes on its cluster. A stored policy is required for v1 sandbox placement. The v1 create API requires an explicit policy in the request. For runners registered without a policy through a legacy path, the gateway can save a deployment-configured default on connection or first v1 placement. Existing policies are preserved. The policy can supply a default sandbox lifetime. The platform enforces the 30-day maximum. See Configure a sandbox policy.
The wizard collects cluster, release channel, and maintenance windows interactively, then opens your editor with a pre-filled spec before submitting:
File mode accepts YAML or JSON, which makes it the preferred path for repeatable setups. It also suits agents like Claude Code or Codex that generate runner specs on your behalf. The CLI also reads from stdin with -f -. Replace CLUSTER_ID with the ID of the CKS cluster to deploy the runner on:
runner.yaml
Submit the spec:
Note the following behaviors:
  • maintenance_policy.windows is optional. When set, automatic updates apply only during the specified cron windows.
  • runner_group_id is optional. Use it for scheduling affinity when you have multiple runners in the same zone.

Common validation errors

Check runner status

After creation, check the runner’s status to confirm it rolled out successfully and to diagnose problems if it didn’t.
For a quick summary in tabular form, use the alias get:
Both commands use the runner ID you supplied on create (prod-us-east-1).
The API response carries two status fields to track:
  • installStatus: progress of the runner deployment into your cluster. Values include RUNNER_INSTALL_STATUS_PENDING, RUNNER_INSTALL_STATUS_PROVISIONING, RUNNER_INSTALL_STATUS_READY, and RUNNER_INSTALL_STATUS_FAILED.
  • connectionStatus: reported connectivity (RUNNER_CONNECTION_STATUS_CONNECTED or RUNNER_CONNECTION_STATUS_DISCONNECTED). Read it together with installStatus and lastHeartbeatTime. See Heartbeats for the health fields.
The CoreWeave Intelligent CLI’s table and describe output use short display labels, such as READY and CONNECTED, for these API enum values. For installation failures, structured error details can be absent if stored error data is unavailable or can’t be decoded. When installStatus is RUNNER_INSTALL_STATUS_FAILED, the response can include a structured installError:
Example output
Follow the available remediationHints to address the failure. Internal diagnostic details are redacted from the API response. The diagnosticDetail field doesn’t provide logs you can attach to a support ticket. If structured error details are absent or you need more help, contact support. Include the runner ID and any error details returned in the response.

Update a runner

For a runner managed with Terraform, edit its resource configuration, review terraform plan, and apply the plan. Keep the complete desired policy and overrides in the configuration. Later applies can revert changes made through the CLI or API. For drift and replacement behavior, see Update the Terraform configuration. The runner edit command supports both an interactive wizard and a file-driven patch. Internally, updates use a field mask: only the fields you change are applied. Everything else is read-only, including installStatus, connectionStatus, timestamps, and the resolved deployment spec. For mutable field paths, see Field masks on updates. In the v1 REST API, the PATCH body is the managed runner itself, with no request wrapper. The field mask travels as the updateMask query parameter. An omitted or empty mask replaces the whole mutable resource. v1 managed-runner writes reject profile_bindings (configure policy instead) and spec.allow_privileged_profile_annotations. These settings remain available on legacy v1beta2, where the privileged-profile flag’s Protobuf or YAML path is managed_spec.allow_privileged_profile_annotations. In REST JSON and the updateMask query parameter, use managedSpec.allowPrivilegedProfileAnnotations.

Common runner updates

The following examples show how to edit a runner: switching release channels, replacing the policy it carries, tuning where the runner Pod lands in your cluster, and allowing legacy profile templates to carry a privileged posture.

Example: switch release channel

Apply a one-line patch from stdin:
Or write the patch to a file and submit it:
patch.yaml

Example: replace the policy

The examples in this guide select the root policy update mask, which replaces the whole document. Read the current policy, change what you need, and send the complete document back with its current etag. A root-policy replacement clears groups you leave out. Follow Update a policy for the CLI and REST procedures. Capture the policy and its etag from the same read, then submit the edited document with that etag to detect concurrent changes.

Example: pin Node placement through deployment overrides

Use the Node selector, tolerations, scheduler settings, and affinity in spec.overrides to control where the runner’s own Pods run. Other overrides have a different scope: cpu_runtime_class and gpu_runtime_class configure the runtimes used for sandbox Pods. A common case is routing the runner Pod through the SUNK Pod Scheduler so it can run in your SUNK cluster alongside Slurm jobs. Set the scheduler name and the SUNK annotations on the runner overrides. See SUNK Pod Scheduler integration for the available annotations and required setup.
overrides.yaml

Example: configure runner affinity

Use spec.overrides.affinity to set Kubernetes Node affinity, Pod affinity, or Pod anti-affinity for the runner’s own Pods. The value is a Kubernetes Affinity object, with Kubernetes camel case keys inside it. Runner affinity doesn’t configure sandbox Pod placement or change Node budgets. The following example prefers Nodes labeled example.com/capacity-class: on-demand while leaving other eligible Nodes available. Replace this illustrative label with one used by your cluster.
Use a version of the CoreWeave Intelligent CLI that supports runner affinity. If the command reports an unknown affinity field, upgrade the CLI or use the REST example.
  1. Save the affinity patch:
    affinity.yaml
  2. Apply it to your runner:
An affinity-only patch targets spec.overrides.affinity, preserving other overrides. If the same patch includes other override fields, the CLI replaces the whole spec.overrides object. Include every sibling override you want to keep.
Kubernetes combines preferred affinity with other scheduling scores. This preference doesn’t guarantee on-demand-first placement or move an already running Pod when preferred capacity becomes available. Existing node_selector restrictions still apply. Nodes with NoSchedule or NoExecute taints require matching tolerations. To allow spot fallback, don’t use a Node selector that excludes spot Nodes. For a hard placement restriction, use requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms. Required Node affinity and node_selector must both match. Terms are combined with logical OR. Expressions within a term are combined with logical AND. Required Node affinity participates in runner preflight checks. Kubernetes evaluates preferred affinity and Pod affinity or anti-affinity during scheduling. After an update, use cwic sandbox runner describe prod-us-east-1 to check rollout progress. In the API response, verify that activeRevision matches targetRevision, installStatus is RUNNER_INSTALL_STATUS_READY, and connectionStatus is RUNNER_CONNECTION_STATUS_CONNECTED. The resolved configuration appears in the output-only deploymentSpec.affinity field. Affinity is replaced as a whole, rather than merged rule by rule. To remove all affinity rules, including inherited rules, apply an explicit empty object:
To remove the override and restore platform defaults, use affinity: null in an affinity-only CLI patch. For REST, keep updateMask=spec.overrides.affinity and send {"spec":{"overrides":{}}}. Clearing affinity leaves Node selectors and tolerations unchanged. The legacy v1beta2 field is managed_spec.overrides.affinity. New integrations use the v1 field spec.overrides.affinity shown here.

Example: allow a privileged profile posture

allow_privileged_profile_annotations controls whether the legacy profile templates bound to a runner may carry a privileged posture. It applies to runners that still use profile bindings rather than a policy, so the request goes to the v1beta2 surface. It defaults to false, and a template that carries one is rejected on a runner where the flag isn’t set. Despite the name, the flag governs two kinds of content:
  • Privileged Pod annotations, meaning the runtime and scheduler prefixes.
  • Privileged structured Pod-spec fields, such as serviceAccountName, host namespaces, hostPath volumes, and privileged or escalating containers.
A template that a runner rejects returns permission_denied and names the offending fields. For example, a template that sets securityContext.appArmorProfile and securityContext.seccompProfile fails with the following:
Example output
Set the flag on the runner that rejected the template. The flag is scoped to one runner, so repeat this for each runner that needs the privileged posture. Use the v1beta2 REST API to set the flag. In CoreWeave Intelligent CLI 1.49.0, cwic sandbox runner edit uses v1 and rejects this legacy setting.
Allow a privileged profile posture on one runner
After the update succeeds, reapply the profile template that was rejected.
Setting this flag widens what sandboxes on the runner can do, including reaching host resources. Set it only on runners where the privileged posture is required. Any user with the Sandbox Admin role can set this flag. Setting it can give sandboxes Node access comparable to that of a cluster administrator.

Trigger an on-demand runner update

When updateAvailable is true on the runner, you can apply the update immediately rather than wait for the next maintenance window:
The control plane resolves the latest version on the runner’s release channel and bumps target_revision. The in-cluster controller rolls it out.

List runners

To see every runner in your organization, or to narrow the view to a specific zone, cluster, or connection state, use the following list commands.
Filter by zone, cluster, or connection status. The --connection-status flag accepts the short values CONNECTED and DISCONNECTED:

Delete a runner

Remove a runner when you no longer need sandbox capacity on its cluster, or before you redeploy a fresh runner on the same cluster.
The CLI prompts for confirmation. Pass --yes to skip the prompt for scripted use:
Deleting a runner removes the runner deployment in your cluster. Any sandboxes running on that runner stop. The policy is part of the runner, so it’s deleted with it. If you intend to redeploy the cluster, keep the policy document in version control.
Deletion is permanent. If you only want to pause traffic, move sandboxes to another runner before you delete this one.

See also

For related guidance, see the following pages:
Last modified on November 6, 2026