Skip to main content

Astro Agent

The Astro Agent (astro-agent) securely connects a cluster to AstroPulse, and AstroPulse needs it to manage the cluster. It reports the cluster's health and metrics, tells AstroPulse which storage the cluster offers, and carries the reports that add-ons such as Cost Visibility, Vulnerability Scanning and Workload Queueing rely on. It is installed with the cluster and removed with it.

When to use it​

Every cluster runs it; you never pick it. What it gives you:

Before you start​

  • A cluster AstroPulse created, or one you registered.

In the console​

  1. Open the cluster from the cluster list and select the Add-ons tab. Astro Agent is listed under Platform from the start.
  2. Select it. The header marks it Managed with cluster; hover the mark for how it is removed. Overview shows its version, health checks, availability and resources.
  3. When a newer release is offered, select Upgrade, then Upgrade in the confirm, which names the release it moves to.
  4. To rebuild the agent at the release it runs, select Resync, then Resync in the confirm.
Open zoom view

The Add-ons tab of eks-prod, where Astro Agent is listed with the other add-ons

The Add-ons tab of eks-prod, where Astro Agent is listed with the other add-onsThe Add-ons tab of eks-prod, where Astro Agent is listed with the other add-ons

You should see​

Status reads Deployed and Health counts its checks as passing. The cluster's header reads Connected, with when the agent last checked in.

How it gets onto a cluster​

  • A cluster AstroPulse creates gets the agent once the cluster is ready. If that install does not finish, the cluster is still ready: the agent shows in the add-on list, and applying it again retries.
  • A cluster you register already runs the agent you installed while registering, and it shows in the add-on list from the start. The first time you apply it, AstroPulse takes over the agent's resources under their existing names and namespace. From then on it is updated like any other add-on.

Security: the agent connects to AstroPulse with a certificate of its own, issued for this cluster, and that certificate stays on the cluster. Applying or updating the add-on keeps a valid certificate, and replaces one that has expired or could never connect.

Update it​

In the console, Upgrade on the agent, as above. With astroctl:

Terminal
astroctl infra k8s register agent update --cluster-name eks-prod

On a cluster AstroPulse created, this updates the agent through the add-on. On a registered cluster it updates through the add-on while the agent is connected; one that is neither applied as an add-on nor connected is updated with kubectl, from a machine with access to the cluster.

Resync rebuilds the agent at the release it runs and never moves it to a newer one, so use it to repair the agent without upgrading it. A release that is no longer published is refused, naming the latest release; upgrade to move to it.

It is removed with the cluster​

The console offers no Uninstall for the agent, and astroctl infra k8s addons delete refuses it. It leaves when the cluster is deleted, or with astroctl infra k8s unregister on a registered cluster.

When it is not reporting​

The add-on's health says what to do, and the next step is offered beside it:

  • On a cluster AstroPulse created, Resync the agent to install it again, or apply it if it was never recorded as an add-on.

  • On a registered cluster, AstroPulse reaches the cluster only through the agent, so it cannot reinstall it for you. From a machine with kubectl access to the cluster, register it again:

    Terminal
    astroctl infra k8s register -c eks-prod

Run it in production​

  • It grows with the cluster. The agent reserves 500m CPU and 512Mi memory, its limit too. Its memory peaks when it re-reads every resource it watches. On a large cluster, raise Resources memory, or it can run out of memory during that re-read: Availability and resources.
  • A standby copy runs on a cluster with 2 or more fixed nodes, with Availability High, or when every node it can run on is Spot.
  • It keeps nothing on disk beyond a small spool of cost hours waiting to be sent.

Other ways in​

  • Nova: ask it, for example "is the agent on eks-prod up to date?".
  • SDK and API: the same operations, in the API reference.

With astroctl​

Terminal
astroctl infra k8s addons get eks-prod astro-agent
astroctl infra k8s addons resync eks-prod astro-agent

Settings​

The agent takes no settings of its own, only the two every add-on takes: Availability and resources.

If it's refused​

"The astro-agent add-on can't be deleted on its own: it is removed when the cluster is deleted (astroctl infra k8s delete)."
Cause
astroctl infra k8s addons delete named the agent on a cluster AstroPulse created.
Fix
Nothing to do: the agent stays while the cluster exists.
"The astro-agent add-on can't be deleted: it is what connects this cluster to AstroPulse. It is removed with astroctl infra k8s unregister, which disconnects the cluster from AstroPulse and uninstalls the agent."
Cause
astroctl infra k8s addons delete named the agent on a registered cluster.
Fix
Run astroctl infra k8s unregister only if you mean to disconnect the cluster.
"Agent is not reporting. Resync the astro-agent add-on to install the agent again."
Cause
The agent on a cluster AstroPulse created stopped reporting.
Fix
Select Resync on the agent, or run astroctl infra k8s addons resync <cluster> astro-agent.
"Agent is not reporting. AstroPulse reaches this cluster only through its agent, so register the agent again from a machine with access to the cluster."
Cause
The agent on a registered cluster stopped reporting.
Fix
Run astroctl infra k8s register -c <cluster> from a machine with kubectl access to it.
"The latest agent release can't be determined right now; try again in a minute."
Cause
AstroPulse could not read the agent's release list for a resync.
Fix
Run the resync again after a minute.

Next​