Skip to main content

astroctl_infra_kubernetes_unregister_agent

astroctl infra kubernetes unregister agent

Disconnect an agent from the platform

Synopsis

Disconnect a registered cluster's agent from Astro Platform.

What this does:

  • Disconnects the agent tunnel (agent goes dormant)
  • DELETES all platform-managed applications and their resources from your cluster
  • Keeps cluster record for easy reconnection (use --permanent to also remove it)

What this does NOT do:

  • Does NOT delete or modify the cluster itself (EKS, GKE, etc.)
  • Resources NOT managed by the platform are untouched

This is useful for:

  • Agent rotation (disconnect + re-register)
  • Temporarily pausing platform management
  • Switching to a different platform configuration

Use --permanent to also delete the cluster record from the platform. Without --permanent, you can reconnect anytime with: astroctl infra k8s register agent --agent-name <cluster-name>

astroctl infra kubernetes unregister agent [flags]

Examples


# Disconnect agent, keep cluster record for reconnection
astroctl infra k8s unregister agent --agent-name my-cluster

# Reconnect later
astroctl infra k8s register agent --agent-name my-cluster

# Disconnect via specific kubeconfig context
astroctl infra k8s unregister agent --agent-name my-cluster --context my-context

# Keep agent running locally, just disconnect from platform
astroctl infra k8s unregister agent --agent-name my-cluster --skip-uninstall

# Permanent removal: disconnect + delete cluster record
astroctl infra k8s unregister agent --agent-name my-cluster --permanent

# By agent ID (internal UUID)
astroctl infra k8s unregister agent --agent-id 550e8400-e29b-41d4-a716-446655440000

# Skip all confirmations (for automation/scripts)
astroctl infra k8s unregister agent --agent-name my-cluster --yes

Options

--agent-id string Internal agent ID (UUID) to unregister
--agent-name string Name of the agent to unregister (cluster name)
--context string Kubeconfig context to use for agent removal
-h, --help help for agent
--kubeconfig string Path to kubeconfig file (defaults to ~/.kube/config)
--permanent Also delete cluster record from platform (cannot reconnect with same name)
--skip-uninstall Keep agent running on cluster (skip kubectl removal)
-y, --yes Skip all confirmations (useful for automation)

Options inherited from parent commands

-o, --output string Output format (json|yaml) (default "yaml")

SEE ALSO