Skip to main content

astroctl infra kubernetes register

Register an existing Kubernetes cluster

Synopsis​

Register any Kubernetes cluster with AstroPulse.

Works with any cluster: EKS, GKE, AKS, on-premises, or local development clusters. The CLI deploys a lightweight agent to your cluster that keeps a secure, mutually authenticated (mTLS) connection to AstroPulse. Region is auto-detected when possible.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ YAML registration format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Terminal
apiVersion: platform.astropulse.io/v1
kind: K8sClusterRegistration
metadata:
name: my-cluster # required
spec:
region: us-east-1 # optional: auto-detected when possible
kubernetesVersion: 1.33.2 # optional: detected from the cluster when left out
architecture: amd64 # optional: amd64 or arm64; amd64 when left out
labels: # optional: merged with --labels; the file wins a key both set
env: prod

For EKS, Auto Mode is detected from running Auto Mode nodes. A new cluster can have no nodes, so use --eks-compute-mode when detection cannot prove the mode.

Terminal
astroctl infra kubernetes register [cluster-name] [flags]

Examples​

Terminal

# Register any cluster (auto-detects type and region)
astroctl infra k8s register --cluster-name my-cluster

# Register from YAML file (manifest format)
astroctl infra k8s register -f registration.yaml

# Register via stdin
echo 'apiVersion: platform.astropulse.io/v1
kind: K8sClusterRegistration
metadata:
name: my-cluster' | astroctl infra k8s register -f -

# Register only (don't install agent, for split-team flow)
astroctl infra k8s register --cluster-name my-cluster --no-install

# Dry run: print agent manifest without deploying
astroctl infra k8s register --cluster-name my-cluster --dry-run

# Install agent on a pre-registered cluster (split-team flow)
astroctl infra k8s register agent --cluster-name my-cluster

Options​

Terminal
-c, --cluster-name string Name for the cluster in AstroPulse
--context string Kubernetes context to use
--dry-run Print agent manifest without deploying
--eks-compute-mode string EKS compute mode for add-on safety (ManagedNodeGroups|AutoMode); Auto Mode is detected when possible
-f, --file string YAML file with registration config. Use '-' for stdin.
-h, --help help for register
--kubeconfig string Path to kubeconfig file (defaults to current context)
--labels stringArray Labels for the cluster (key=value, can be repeated)
--namespace string Namespace for agent deployment (default "astroplatform-system")
--no-install Register only; don't install agent (for split-team flow)
--region string Cloud region override. Auto-detected if omitted.

Options inherited from parent commands​

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

SEE ALSO​