How registration works
Registering brings a Kubernetes cluster you already run into AstroPulse: any conformant cluster, on any cloud, on-premises, at the edge or on your laptop. astroctl installs a small agent in the cluster with your own kubectl, and the agent connects out to AstroPulse. Nothing opens inbound, AstroPulse never holds a kubeconfig or token for the cluster, and the agent runs in its own namespace without touching your workloads. The walkthrough is Register a cluster you already run; this page is the reference.
Before you start
- kubectl with a context for the cluster, and rights to install into it.
astroctlinstalled and signed in.- An org admin role, and a plan that includes registered clusters.
In the console
-
On New cluster, choose Bring your own Kubernetes.
-
Enter the Cluster name. The console shows the
astroctl infra k8s registerandastroctl infra k8s register statuscommands for it.Open zoom view -
Run them with
kubectlpointed at the cluster.
You should see
The cluster's page reads Registered. On its Overview, the Agent line shows the connection, Connected once the agent reports, and the last check-in. While the registration has not settled, the line also shows its state and the agent's message. The Events tab streams each step as it happens.
What register does
astroctl infra k8s register --cluster-name my-cluster:
- Checks that
kubectlreaches the cluster. - Detects the cluster's region when it can.
- Fetches the agent's manifest.
- Makes the agent's private key on your machine, and sends AstroPulse only a signing request for it. AstroPulse returns the agent's certificate.
- Installs the agent, with the key and certificate in its TLS Secret.
- Reports the registration's state.
The agent's private key is never made, sent or stored by AstroPulse.
How the agent stays trusted
- Mutual TLS. Both sides check identity on every connection. AstroPulse accepts only the certificate it last issued to the cluster, and the one it replaced for 15 minutes.
- Renewal. The agent renews its certificate before it expires: it makes a new key inside the cluster, and AstroPulse signs only a request for it. To issue a new certificate yourself, run
astroctl infra k8s register --cluster-name my-clusteragain. - One organization. A cluster that already runs another organization's agent is refused until that organization unregisters it.
- Outbound only. The agent needs outbound HTTPS on port
443. A NetworkPolicy on theastroplatform-systemnamespace can block every other egress from its pods.
An agent too old to renew its certificate shows the notice Agent update required: "This cluster's agent is too old to renew its certificate. Update the agent before <time>, when its certificate expires and it can no longer connect." Update the agent before then.
Register from a manifest
A registration is a K8sClusterRegistration manifest:
apiVersion: platform.astropulse.io/v1
kind: K8sClusterRegistration
metadata:
name: my-production-cluster
spec:
region: us-west-2
labels:
env: prod
team: platform
Dry-run it first: it prints the agent manifest and registers nothing. Then apply it:
astroctl infra k8s register -f registration.yaml --dry-run
astroctl infra k8s register -f registration.yaml
-f - reads the manifest from stdin. --dry-run, --no-install, --kubeconfig and --context apply with -f. --region, --namespace, --eks-compute-mode and --labels apply too, but the file wins: its spec.region, spec.agentNamespace and spec.provisionerConfig.eksComputeMode replace the flag, and its labels win a key both set. A field the registration does not have is ignored with a warning naming it.
Register in two teams
When one team owns AstroPulse and another owns the cluster, register first and install later:
# Team 1: create the registration only
astroctl infra k8s register --cluster-name prod-cluster --no-install
# Team 2: install the agent, from a machine that reaches the cluster
astroctl infra k8s register agent --cluster-name prod-cluster --context prod-k8s
To review the manifest first, astroctl infra k8s register manifest --cluster-name prod-cluster prints it. It has no TLS Secret for the agent and prints no key, and says so:
The agent's TLS Secret is not in the manifest: its key is made on the machine that installs the agent, and AstroPulse signs only a request for it. 'astroctl infra k8s register agent' installs the agent with it.
Install the agent with its Secret: astroctl infra k8s register agent --cluster-name prod-cluster
If you apply the manifest yourself, also run astroctl infra k8s register agent --cluster-name prod-cluster from a machine that reaches the cluster. It makes the key there and writes the Secret.
Update the agent
The agent is the cluster's Astro Agent add-on. On the cluster's Update tab, its card says whether a newer version exists; Upgrade in Add-ons opens it on the Add-ons tab, where Upgrade updates it like any other add-on.
astroctl infra k8s register agent update --cluster-name my-cluster --dry-run
astroctl infra k8s register agent update --cluster-name my-cluster
The update goes through the add-on while the agent is connected. An agent that is neither connected nor recorded as its add-on is updated with kubectl from your machine. The cluster must be registered.
AstroPulse does not upgrade a registered cluster's Kubernetes: you upgrade it where it runs.
Unregister a cluster
- Open the cluster and select Unregister at the top of the page. The dialog reads Unregister Cluster: "This will disconnect the agent from this cluster. The cluster itself will not be destroyed."
- Choose what else to remove:
- Also delete deployed applications from the cluster. Off by default: "your applications keep running, and AstroPulse just stops managing them."
- Also remove the cluster from AstroPulse. Off by default: "the cluster stays listed as disconnected, with its history, so you can reconnect it." On, the cluster, its add-on records and its history are removed from AstroPulse, and you can register it again later.
- Type the cluster name, then select Disconnect agent, or Unregister and remove when the second box is checked.
The cluster itself is never touched. astroctl infra k8s unregister agent is the same as Disconnect agent, and astroctl infra k8s unregister is the same as Unregister and remove:
astroctl infra k8s unregister --cluster-name my-cluster
astroctl infra k8s unregister --cluster-name my-cluster --delete-apps
Other ways in
- Nova: ask "how do I register my current cluster as prod-eks?" and Nova returns the
astroctlcommand for you to run, since the agent installs with yourkubectl. Ask to remove a cluster and Nova confirms the cluster with you, then returns theastroctl infra k8s unregistercommand; it never unregisters one on its own. Once connected, ask "is prod-eks healthy?" and Nova reads it directly. - SDK and API: the same operations, in the API reference.
With astroctl
astroctl infra k8s register --cluster-name my-cluster --labels env=prod --labels team=infra
astroctl infra k8s register status --cluster-name my-cluster
astroctl infra k8s register agent list
astroctl infra k8s progress stream my-cluster
An interrupted registration (a closed terminal, a network timeout) picks up again with astroctl infra k8s register resume --cluster-name my-cluster. Every flag: astroctl infra k8s register.
Settings
metadata.nameRequiredThe cluster's name in AstroPulse. Set this or spec.clusterName; if both are set they must match.
-, starting and ending with a letter or number, up to 50 characters.spec.regionThe cloud region or zone the cluster runs in, such as us-west-2, or local outside a cloud.
local. Not detected on a dry run.spec.agentNamespaceThe namespace the agent is installed in.
astroplatform-systemspec.architectureThe nodes' CPU architecture.
amd64 or arm64.amd64spec.kubernetesVersionThe cluster's Kubernetes version.
MAJOR.MINOR.PATCH. A leading v, as kubectl prints it, is removed; anything else is refused before it is sent.spec.provisionerConfig.eksComputeModeEKS only: how the cluster gets nodes, so add-ons that would conflict are refused.
ManagedNodeGroups or AutoMode.spec.labelsLabels stored on the cluster, following the Kubernetes label rules.
The full schema is api.K8sClusterRegistration in the API reference.
If it's refused
astroctl adds the owning organization, read from the agent on your cluster, when it can.astroctl org use, unregister the cluster there, then switch back and register it.astroctl infra k8s cancel was used while the cluster was registering.astroctl infra k8s progress stream my-cluster until it ends. Then fix what blocked it and register again, or unregister the cluster.Troubleshooting
The agent is installed but the cluster reads disconnected:
kubectl get pods -n astroplatform-system
kubectl logs -n astroplatform-system deploy/astro-agent
astroctl infra k8s register status --cluster-name my-cluster
Register fails with a kubectl error: check the context with kubectl config current-context and kubectl cluster-info, then pass --context or --kubeconfig to register.