Skip to Content
CLI Referencenkapp infra

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>]
FlagTypeDefaultDescription
-e, --env <env>stringlocalTarget environment

infra status

Show the current infrastructure status from the local state file.

nkapp infra status

Displays 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>]
FlagTypeDefaultDescription
-e, --env <env>stringTarget 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 production

infra destroy

Nuclear option to wipe all remote infrastructure for a specific environment.

nkapp infra destroy [-e <env>] [-y]
FlagTypeDefaultDescription
-e, --env <env>stringlocalEnvironment to destroy
-y, --yesbooleanfalseSkip 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 staging

infra unlock

Manually clear stale infrastructure locks (e.g., provisioning locks on shared volumes).

nkapp infra unlock [-e <env>]
FlagTypeDefaultDescription
-e, --env <env>stringlocalEnvironment 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.