nkapp infra
Manage cloud infrastructure settings and view current resource status.
nkapp infra <subcommand> [options]Subcommands
infra apply
Directly reconcile infrastructure without deploying services. This is an internal/advanced command.
nkapp infra apply [-e <env>]| Flag | Type | Default | Description |
|---|---|---|---|
-e, --env <env> | string | local | Target environment |
infra status
Show the current infrastructure status from the local state file.
nkapp infra statusDisplays all active resources with their ID, status, and type:
Current Infrastructure Status:
──────────────────────────────────────────
✔ abc123def456... | running | container
✔ 789xyz012345... | running | container
──────────────────────────────────────────infra set <key=value>
Configure an infrastructure property in nanokit.yml.
nkapp infra set <key=value> [-e <env>]| Flag | Type | Default | Description |
|---|---|---|---|
-e, --env <env> | string | — | Target environment. If omitted, sets in root infra:. |
Common keys: provider, region, scaling, min, max.
# Set global provider
nkapp infra set provider=aws
# Set local provider
nkapp infra set provider=docker -e local
# Set region for production
nkapp infra set region=eu-west-1 -e productioninfra destroy
Nuclear option to wipe all remote infrastructure for a specific environment.
nkapp infra destroy [-e <env>] [-y]| Flag | Type | Default | Description |
|---|---|---|---|
-e, --env <env> | string | local | Environment to destroy |
-y, --yes | boolean | false | Skip confirmation prompt |
This command performs a deep cleanup of the provider’s resources (VPC, Clusters, Load Balancers, etc.) without touching local state files. Use this to decommission an environment or clean up after a failed deployment.
# Wipe staging environment on AWS
nkapp infra destroy -e staginginfra unlock
Manually clear stale infrastructure locks (e.g., provisioning locks on shared volumes).
nkapp infra unlock [-e <env>]| Flag | Type | Default | Description |
|---|---|---|---|
-e, --env <env> | string | local | Environment to unlock |
Use this command if a deployment was interrupted and subsequent runs are blocked by a “Shared modules are being initialized…” or “Lock held by another process” message.