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 [-e <env>]

Displays all active resources with their ID, status, and type:

Current Infrastructure Status: ────────────────────────────────────────── ✔ abc123def456... | running | container ✔ 789xyz012345... | running | container ──────────────────────────────────────────

Editing infrastructure settings

Infrastructure properties in nanokit.yml are edited with nkapp config infra set (not an infra subcommand):

# Set global provider nkapp config infra set provider=aws # Set local provider nkapp config infra set provider=docker -e local # Set region for production nkapp config infra set region=eu-west-1 -e production

Common keys: provider, region, scaling, min, max.


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.