Skip to content
↗ Astrona.io Cloud Native learning, open to everyone.

Astrona reset

astrona reset

Start a lab over: destroy it and recreate it from its config

Synopsis

Start a lab over from scratch: run its teardown scripts, destroy it, then do everything astrona run does — the lab ends up exactly as a fresh astrona run leaves it. If the lab isn't running, it's simply created.

The config is validated before anything is destroyed, so a broken config never leaves you without a lab. teardown.keepCluster is ignored — reset always recreates.

Asks for confirmation (everything done in the lab is lost); --yes skips it and is required with --headless or when not running in a terminal. --headless also skips the login reminder and new account sessions.

--cluster rebuilds only that linked cluster (runtime.kind.clusters) of a running lab: its teardown scripts, destroy, then create and bootstrap it again (with the addresses of the clusters it dependsOn). The lab and its other clusters are left alone; port forwards into the rebuilt cluster are restarted.

A full reset of a catalog lab asks for confirmation when signed out, like astrona run (--without-login confirms without prompting). When signed in, it starts a fresh session and reports when the rebuilt lab is ready for its course page. --soft and --cluster keep the current session and need no sign-in.

Like astrona run, a full reset points kubectl at the lab (the context to go back to is still the one from before the lab first ran); --keep-context leaves it alone.

--soft keeps the clusters: it deletes every namespace created after the platform (kube-system, addons, …) was set up, clears what isn't astrona's from the default namespace, and runs the bootstrap again — seconds instead of minutes. Cluster-wide objects (CRDs, ClusterRoles, …) aren't reverted; use a full reset for those. With --cluster, only that linked cluster.

astrona reset [lab] [flags]

Examples

  astrona reset -c ./labs/my-lab
  astrona reset -c ./labs/my-lab --yes
  astrona reset -c ./labs/my-lab --cluster idp
  astrona reset -c ./labs/my-lab --soft

Options

      --cluster string   Rebuild only this linked cluster (its runtime.kind.clusters name)
  -h, --help             help for reset
      --keep-context     Leave your kubectl current-context alone (kind labs) — reach the lab with astrona shell or kubectl --context instead
      --parallel int     Create up to N linked clusters (runtime.kind.clusters) at once, 1-5 (default 1: one at a time). dependsOn is still respected, and after a failure nothing new starts (default 1)
      --soft             Keep the cluster(s): delete the lab's namespaces and re-run its bootstrap (seconds instead of minutes)
      --without-login    Confirm running a catalog lab without signing in or tracking progress on Astrona
  -y, --yes              Skip confirmation before deleting and recreating the lab

Options inherited from parent commands

      --accept-terms      Accept this CLI's usage terms and data-loss risk notice; required on each operational CI command (read: astrona terms)
  -c, --config string     Path or URL to the lab config directory (with --git: a subdirectory within the cloned repo) (default ".")
  -f, --file string       Configuration file name override (default "config.yaml")
      --git string        Git repository URL to clone/pull (https://, git@host:, or ssh://) — --config then selects a subdirectory within it
      --git-ref string    Git branch, tag, or commit to check out (used with --git; default: the repo's default branch)
      --headless          Disable the terminal UI and CLI prompts; run/reset skip login reminders and new account sessions
      --install-version   If the lab needs another astrona release (astronaVersion) that isn't installed, install it without asking — for CI
      --trust             Approve running a remote (--git / URL) lab without asking — for CI; review the lab first
      --update-check      Check for new CLI releases (disabled in CI, without a terminal, or by ASTRONA_NO_UPDATE_CHECK) (default true)
      --verbose           Stream the full output of every underlying command instead of the compact step view

SEE ALSO

  • astrona - Astrona is the Astrona lab community CLI
Auto generated by spf13/cobra on 20-Oct-2026