> ## 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.

# idyl apply

> Apply resource manifests from a file

Apply resource manifests from a YAML file.

The command creates each resource if it does not exist, or updates it if it
already exists where the resource API supports updates. Supported kinds are
Namespace, Deployment, ReplicaSet, Pod, Job, Sandbox, CronJob, Service, WebApp,
Gateway, HTTPRoute, TLSRoute, ReferenceGrant, and RegistryCredential. A file
can contain multiple YAML documents separated by ---.

Container specs may include imagePullSecret: secret://name or
imagePullSecret: secret://namespace/name for private image pulls.
RegistryCredential manifests must include spec.passwordData with the base64
encoded registry password.

## Usage

```bash theme={null}
idyl apply -f FILENAME [flags]
```

## Flags

| Flag                                | Description                                                                                       |
| ----------------------------------- | ------------------------------------------------------------------------------------------------- |
| `-f <string>, --filename <string>`  | Required. Path to the manifest file containing the resources to apply.                            |
| `--fleet <string>`                  | Constrain scheduling to eligible members of this fleet within the workload's subnet, by fleet ID. |
| `-n <string>, --namespace <string>` | Namespace name, overriding the current context.                                                   |
| `--node <string>`                   | Constrain scheduling to this single node within the workload's subnet, by node ID.                |
| `-s <string>, --subnet <string>`    | Subnet for workload placement, overriding the current context.                                    |

## Inherited flags

| Flag                                 | Description                                                        |
| ------------------------------------ | ------------------------------------------------------------------ |
| `-a <string>, --account-id <string>` | Account ID to use, overriding the current context.                 |
| `-c <string>, --context <string>`    | Use the named context for this command.                            |
| `--homedir <string>`                 | Override the configuration directory. Defaults to \~/.config/idyl. |
| `-o <string>, --output <string>`     | Output format (json\|yaml).                                        |
| `-p <string>, --profile <string>`    | Override the access profile for this command.                      |
| `--realm <string>`                   | Override the realm for this command.                               |

## Examples

```bash theme={null}
# Apply a Namespace manifest
idyl apply -f namespace.yaml

# Apply a Sandbox manifest
idyl apply -f sandbox.yaml

# Apply multiple resource manifests from one file
idyl apply -f resources.yaml
```
