> ## Documentation Index
> Fetch the complete documentation index at: https://datum.net/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Compute operations

> Check the status of Compute workloads and Instances, update them, and delete them.

This page shows how to check on a running workload, change it, and delete it. To find out why an Instance isn't running, see [Troubleshooting](https://datum.net/docs/compute/troubleshooting.md).

> [!NOTE]
>
> Compute is in preview, and the `v1alpha` API can change.

## Before you begin

* Select a project, install the `compute` plugin, and get access to Compute. For more information, see [Compute commands](https://datum.net/docs/datumctl/compute/overview.md).

## Check workload status

To list the workloads in your project, run the following command:

```bash theme={null}
datumctl compute workloads
```

The `HEALTH` column shows `Available`, `Degraded`, `Unavailable`, or `Unknown`. The `READY` column shows how many Instances are ready out of how many the workload wants, and `UP-TO-DATE` shows how many run the latest template.

To filter the list, add `--health` with a health value in lowercase, such as `--health=degraded`, or `--location` with a location, such as `--location=us-central-1`.

To see the configuration, ALB hostname, and per-location health of one workload, run the following command:

```bash theme={null}
datumctl compute workloads describe WORKLOAD_NAME
```

Replace `WORKLOAD_NAME` with the name of your workload.

In the [Cloud Portal](https://cloud.datum.net), **Compute** > **Workloads** lists the same workloads, with each one's health, recent CPU and memory, network, and locations.

![The Workloads page with totals for workloads, Instances, healthy workloads, and requests, and a table of workloads with status, CPU and memory sparklines, network, and locations](https://mintcdn.com/datum-4926dda5/Xc9AnQUL-oEENeSS/images/compute-workloads-list.png?fit=max\&auto=format\&n=Xc9AnQUL-oEENeSS\&q=85\&s=e8eea062cc281be1fdcf206b21313968)

Workloads in the Cloud Portal

The workload's `Available` condition also has a reason, which you can see with `datumctl get workloads`. When a workload isn't available, the reason points to the cause, and the Instance has the details.

## Check Instances

To list the Instances of a workload, run the following command:

```bash theme={null}
datumctl compute instances --workload=WORKLOAD_NAME
```

To list Instances in one location, add `--location` with a location, such as `--location=us-central-1`. To add the instance type column, add `-o wide`.

The `STATUS` column describes each Instance in plain language:

| Status | Meaning |
| - | - |
| `Available` | The Instance is running. |
| `Starting` | Datum is starting the Instance. |
| `Pending (quota exceeded)` | Your project doesn't have enough compute quota for the Instance. |
| `Pending (REASON)` | The Instance is waiting on something else, named by `REASON`. |
| `Failed (image unavailable)` | Datum couldn't pull the image. |
| `Failed (crashing)` | The program starts and then exits, repeatedly. |
| `Failed (configuration error)` | Datum refused the Instance's configuration before the program ran. |

To see an Instance's conditions, network addresses, and a plain-language explanation of any failure, run the following command:

```bash theme={null}
datumctl compute instances describe INSTANCE_NAME
```

Replace `INSTANCE_NAME` with a name from the `NAME` column of `datumctl compute instances`.

To open an interactive shell or run a command in a running Instance, see [Instance shell sessions](https://datum.net/docs/compute/instance-shell.md).

To inspect CPU and memory usage or read Instance output, see [Observability](https://datum.net/docs/compute/observability.md).

## Update a workload

To change the image or placement of a workload that you deployed with flags, run `datumctl compute deploy` again with the same name and the new values. For example, the following command deploys a new image version:

```bash theme={null}
datumctl compute deploy WORKLOAD_NAME --image=IMAGE --location=LOCATION --min=COUNT
```

Replace the following:

* `WORKLOAD_NAME`: the name of your workload.
* `IMAGE`: the new image reference.
* `LOCATION`: the locations that the workload runs in.
* `COUNT`: the number of Instances to run in each location.

> [!WARNING]
>
> A flag-based `datumctl compute deploy` replaces the workload's whole template and placements with what the flags describe. It keeps environment variables, ConfigMap and Secret imports, volumes, and labels. It removes registry credentials, custom commands, and extra placements that you set in a manifest, and it sets the Instance count to the `--min` value, which defaults to `1`. Once you manage a workload with a manifest, update it with `datumctl compute deploy -f FILE`.

To update a workload from a manifest, edit the manifest and run `datumctl compute deploy -f FILE`, where `FILE` is the path to your manifest. The command shows the changes and asks for confirmation before it applies them.

> [!TIP]
>
> Push each new image version with a new tag, or reference it by digest, such as `ghcr.io/example/api@sha256:...`. Hosts cache images by tag, so pushing a new image under a tag you already deployed might not reach every Instance.

Datum rolls out template changes one Instance at a time in each location. For more information, see [How rollouts work](https://datum.net/docs/compute/placement-and-scaling.md#how-rollouts-work). To restart Instances without changing the template, see [Restart Instances](https://datum.net/docs/compute/placement-and-scaling.md#restart-instances).

You can't change the following settings after you create a workload:

* The workload name
* The [runtime class](https://datum.net/docs/compute/runtimes/overview)
* The network, and the network interface's `name`, `ipFamilies`, `addresses`, and `reclaimPolicy`

To change one of these settings, deploy a new workload with a different name, and then delete the old one.

## Delete a workload

Deleting a workload with `datumctl compute destroy` also deletes its Instances, its ALB, and the network service that selects it, even if you created the network service separately.

> [!WARNING]
>
> You can't undo the deletion. Anything that an Instance stored on its own filesystem is lost.

To delete a workload, follow these steps:

1. Run the following command:

   ```bash theme={null}
   datumctl compute destroy WORKLOAD_NAME
   ```

   Replace `WORKLOAD_NAME` with the name of your workload.

2. Review the summary of placements, locations, Instances, and the ALB's hostnames that the command prints.

3. Enter `y` to confirm. The command prints `workload/WORKLOAD_NAME deleted.`

To skip the confirmation in scripts, add `-y`.

If you delete a workload with `datumctl delete workload`, Datum deletes the workload and its Instances, but leaves in place any ALB that `datumctl compute deploy` created. Use `datumctl compute destroy` to remove both.

## What's next

* To open a shell in a running Instance, see [Instance shell](https://datum.net/docs/compute/instance-shell.md).
* To fix common problems, see [Troubleshooting](https://datum.net/docs/compute/troubleshooting.md).
* For command details, see [Deploying workloads](https://datum.net/docs/datumctl/compute/deploying-workloads.md), [Operations](https://datum.net/docs/datumctl/compute/scaling-and-operations.md), and [Destroying workloads](https://datum.net/docs/datumctl/compute/destroying-workloads.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.