Managing Agent Pools - Rafay Product Documentation

Agent Pools

Agent Pools provide a way to group multiple agents together, making it easier to manage and update them collectively across templates and environments.

Overview

An Agent Pool is a first-class object that enables managing multiple agents as a group. This is especially beneficial in high-load environments where a single agent might become a bottleneck.

With Agent Pools, users can:

Key Benefits

Configuration Guidelines

UI Workflow

  1. Navigate to GitOps → Agent Pools
  2. Click New Agent Pool

The New Agent Pool pop-up appears

  1. Enter a Name for the pool
  2. Select one or more existing agents to include in the pool
  3. Click Create

Once an agent pool is added, it appears in the Agent Pools list.

The agent pool can be configured when creating an environment template, resource template, and environment.

Below is an example of an Environment Template where the agent pool is selected.

Note: Additional individual agents can also be added, even if they are already part of the selected agent pool.

RCTL CLI

The following example demonstrates how to create an Agent Pool using the RCTL CLI.

apiVersion: gitops.k8smgmt.io/v3
kind: AgentPool
metadata:
  name: cluster-agentpool
  project: defaultproject
spec:
  agents:
    - agentpool-1
    - agentpool-2
    - agentpool-3
    - agentpool-4

Use the below commands to create/get/delete agent pool(s)

Create Agent Pool

Apply an Agent Pool specification file to create a new pool.

./rctl apply -f <agentpool.yaml>

List Agent Pools

To list all agent pools:

./rctl get agentpools

(or)

./rctl get ap

Example

./rctl get agentpools
+-------------------+----------------+----------------+
| AGENT POOL NAME   | AGENTS         | HEALTHY AGENTS |
+-------------------+----------------+----------------+
| p1                | agent1         |                |
+-------------------+----------------+----------------+
| def-ap-1          | def-a-1        | def-a-1        |
+-------------------+----------------+----------------+
| def-ap-2          | def-a-2        | def-a-2        |
+-------------------+----------------+----------------+
| cluster-agentpool | demo-1agent    | demo-3agent    |
|                   | demo-2agent    |                |
|                   | demo-3agent    |                |
|                   | cluster1-agent |                |
+-------------------+----------------+----------------+

To retrieve details of an individual Agent Pool:

./rctl get agentpool <agentpool-name>

Example

./rctl get ap cluster-agentpool
+-------------------+----------------+----------------+
| AGENT POOL NAME   | AGENTS         | HEALTHY AGENTS |
+-------------------+----------------+----------------+
| cluster-agentpool | demo-1agent    |  demo-3agent   |
|                   | demo-2agent    |                |
|                   | demo-3agent    |                |
|                   | cluster1-agent |                |
+-------------------+----------------+----------------+

Delete Agent Pool

To delete a specific Agent Pool:

./rctl delete agentpool <agentpool-name>

(or)

./rctl delete ap <agentpool-name>