ArkService
ArkService routes tasks to available agent instances using round-robin, least-busy, or random load balancing strategies.
API: arkonis.dev/v1alpha1
Kind: ArkService
Short name: aosvc
Scope: Namespaced
ArkService routes incoming tasks to available agent instances, decoupling task producers from the agent pool. It selects a target ArkAgent and distributes tasks across ready pods using a configurable load balancing strategy.
Example
apiVersion: arkonis.dev/v1alpha1
kind: ArkService
metadata:
name: research-service
namespace: default
spec:
selector:
arkAgent: research-agent
routing:
strategy: least-busy
ports:
- protocol: HTTP
port: 8081
Routing strategies
| Strategy | Behavior |
|---|
round-robin | Distributes tasks sequentially across all ready pods. Simple and predictable. |
least-busy | Routes each task to the pod with the fewest active tasks. Best for tasks with variable duration. |
random | Selects a ready pod at random. Useful for even distribution without tracking state. |
Only pods with a passing /readyz check are eligible. Pods that fail the semantic readiness probe are excluded until they recover.
Spec reference
spec
| Field | Type | Required | Default | Description |
|---|
selector | ServiceSelector | yes | — | Identifies the target ArkAgent. |
routing | RoutingSpec | no | — | Task routing configuration. |
ports | []PortSpec | no | — | Ports exposed by the service. |
spec.selector
| Field | Type | Required | Description |
|---|
arkAgent | string | yes | Name of the ArkAgent in the same namespace to route tasks to. |
spec.routing
| Field | Type | Default | Description |
|---|
strategy | string | round-robin | round-robin, least-busy, or random. |
spec.ports[]
| Field | Type | Required | Description |
|---|
protocol | string | yes | HTTP — external task submission. A2A — agent-to-agent communication. |
port | int | yes | Port number. |
status
| Field | Type | Description |
|---|
readyReplicas | int32 | Number of ready agent pods currently receiving tasks. |
conditions | []Condition | Standard Kubernetes conditions. |
See also
- ArkAgent — the agent pool that ArkService routes to
- ArkTeam — for multi-agent pipelines, ArkTeam wires routing automatically