Skip to main content

Recreate Kubernetes scopes

If your Kubernetes cluster encounters issues—such as a restart—that cause a scope to stop working, you can trigger a recreation to restore it.

How it works

Recreating a scope attempts to delete the broken scope and its associated infrastructure, and then creates a new scope using the same configuration.

The recreated scope:

  • Uses the same scope ID and slug.
  • Retains the same configuration as the original.
  • Preserves its custom domain and DNS settings, if configured.
Important:
  • Recreating a scope causes downtime.
  • It may leave behind residual or unstable infrastructure.
  • The recreated scope is not automatically deployed — you need to deploy it manually after the process.

Recreate a scope

  1. Recreate a scope using the UI, CLI, or API.

    From the UI

    • Go to Development > Scopes.
    • Click Actions > Recreate for the scope you want to recreate.

    From the CLI or API

    Patch the scope's status to recreating using our CLI or API. Here's a request example:

    np scope patch --id "$SCOPE_ID" --body '{"status": "recreating"}'
  2. Manually deploy the scope from the UI.

    Once the recreation is complete, you must deploy the scope again to make it functional.

    • Go to Development > Scopes.
    • Click Deploy for the scope you just recreated.