astroctl_infra_kubernetes_unregister
astroctl infra kubernetes unregister
Unregister a cluster from the platform
Synopsis
Completely remove a registered cluster from Astro Platform.
What this does, in order:
- Tombstones the agent so the platform stops accepting its health reports
- DELETES all platform-managed applications from the cluster — done through the still-live agent tunnel, so it must happen before the agent is removed (skipped with --keep-apps)
- Removes the cluster record and its ArgoCD registration from the platform
- Removes the agent from the target cluster (best-effort, if kubeconfig is provided). This is last on purpose: step 2 needs the agent tunnel.
What this does NOT do:
- Does NOT delete or modify the cluster itself (EKS, GKE, etc.)
- With --keep-apps: leaves applications running, platform just stops managing them
Only works for clusters registered via 'astroctl infra k8s register'. For provisioned clusters, use 'astroctl infra k8s delete' instead.
astroctl infra kubernetes unregister [flags]
Examples
# Unregister and delete platform-managed apps (default)
astroctl infra k8s unregister --cluster-name my-cluster
# Unregister but leave applications running on the cluster (BYOK / bring-your-own-cluster)
astroctl infra k8s unregister --cluster-name my-cluster --keep-apps
# Unregister with explicit kubeconfig context
astroctl infra k8s unregister --cluster-name my-cluster --context my-context
# Unregister without removing the agent binary from the cluster
astroctl infra k8s unregister --cluster-name my-cluster --skip-agent
Options
-c, --cluster-name string Name of the cluster to unregister
--context string Kubeconfig context to use
-h, --help help for unregister
--keep-apps Keep platform-managed applications running on the cluster (default: delete them)
--kubeconfig string Path to kubeconfig file (defaults to ~/.kube/config)
--skip-agent Skip removing the agent from the target cluster
Options inherited from parent commands
-o, --output string Output format (json|yaml) (default "yaml")
SEE ALSO
- astroctl infra kubernetes - Manage Kubernetes clusters
- astroctl infra kubernetes unregister agent - Disconnect an agent from the platform