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

# Use a manifest

> Create or update workloads from YAML.

Use a manifest when you want a repeatable workload definition. Apply reads one
or more YAML documents from a file and creates or updates each resource.

## 1. Write a workload manifest

```yaml theme={null}
kind: Deployment
metadata:
  name: web
  subnet: <subnet>
spec:
  replicas: 2
  template:
    spec:
      containers:
        - name: web
          imageURI: nginx:1.25
          resources:
            requests:
              cpu: 500m
              memory: 256Mi
            limits:
              cpu: 500m
              memory: 256Mi
```

Save the file as `web.yaml`.

## 2. Apply the manifest

```bash theme={null}
idyl apply -f web.yaml
```

## 3. Check the result

```bash theme={null}
idyl get deployment web
idyl get pod
```

## 4. Update from the manifest

Edit `web.yaml`, then apply the updated manifest:

```bash theme={null}
idyl apply -f web.yaml
```

## Sandbox manifest

Sandbox manifests require `metadata.name` and `spec.ttl`. Use `metadata.subnet`
or pass `--subnet` when applying the file.

```yaml theme={null}
kind: Sandbox
metadata:
  name: dev
  subnet: <subnet>
spec:
  ttl: 2h
  template:
    spec:
      containers:
        - name: main
          imageURI: ubuntu:24.04
          command: ["sleep", "infinity"]
      isolation:
        class: microvm
```

Apply the Sandbox:

```bash theme={null}
idyl apply -f sandbox.yaml
```

## Scope rules

The CLI resolves account and namespace from flags, manifest metadata, and current context. Use `--namespace` when you want the command to be explicit:

```bash theme={null}
idyl apply -f web.yaml --namespace <namespace>
```

The target subnet belongs in workload metadata as `metadata.subnet`. You can also use `--subnet` to override the manifest value for one command.

Use the [resource manifest reference](/resources/reference/generated) for exact generated YAML fields, examples, allowed values, and read-only fields.
