astroctl infra kubernetes unregister agent
Disconnect an agent from AstroPulse
Synopsis
Disconnect a registered cluster's agent from AstroPulse.
What this does:
Terminal
- Disconnects the agent from AstroPulse (agent goes dormant)
- Keeps cluster record for easy reconnection (use --permanent to also remove it)
- With --delete-apps: DELETES all AstroPulse-managed applications and their
resources. By default applications are LEFT RUNNING and AstroPulse just
stops managing them. The agent is LEFT in place so AstroPulse can delete
the applications through it; remove it once they are gone.
What this does NOT do:
Terminal
- Does NOT delete or modify the cluster itself (EKS, GKE, etc.)
- Resources NOT managed by AstroPulse are untouched
- Cluster add-ons are untouched: without --permanent they stay managed and
are picked up again on reconnect; with --permanent they stay installed and
running, and AstroPulse stops managing them
This is useful for:
Terminal
- Agent rotation (disconnect + re-register)
- Temporarily pausing management by AstroPulse
- Switching to a different AstroPulse configuration
Use --permanent to also delete the cluster record from AstroPulse. Without --permanent, you can reconnect anytime with:
Terminal
astroctl infra k8s register -c prod-01
Terminal
astroctl infra kubernetes unregister agent [agent-name] [flags]
Examples
Terminal
# Disconnect agent, keep cluster record for reconnection
astroctl infra k8s unregister agent --agent-name my-cluster
# Reconnect later
astroctl infra k8s register -c 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 AstroPulse
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
Terminal
--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
--delete-apps Delete AstroPulse-managed applications from the cluster (default: keep them running)
-h, --help help for agent
--kubeconfig string Path to kubeconfig file (defaults to ~/.kube/config)
-n, --namespace string Namespace of the agent (defaults to the registered namespace; required when none is recorded)
--permanent Also delete cluster record from AstroPulse (registering the same name again creates a new cluster)
--skip-uninstall Keep agent running on cluster (skip kubectl removal)
-y, --yes Skip all confirmations (useful for automation)
Options inherited from parent commands
Terminal
-o, --output string Output format (table|json|yaml) (default "table")
SEE ALSO
- astroctl infra kubernetes unregister - Unregister a cluster from AstroPulse