Operations¶
Day-to-day running of tenants: health, upgrades, backups, keys and removal. Every command runs inside your environment. The examples use the tenant from Install a tenant: release arena in namespace arena-tenant-a, agent release arena-agent in namespace arena-agent.
Check health¶
The self-check runs after every install and upgrade (kubectl -n arena-tenant-a logs job/arena-doctor). To run it at any time, feed it the allowlist the chart generated:
kubectl -n arena-tenant-a get configmap arena-doctor-allowlist \
-o jsonpath='{.data.outbound-allowlist\.txt}' \
| kubectl -n arena-tenant-a exec -i deploy/arena-api -- \
sh -c 'cat > /tmp/allowlist.txt && /usr/app/arena-cli task doctor_outbound allowlist:/tmp/allowlist.txt'
The self-check covers Postgres, the object store, OpenObserve and the GPU cluster, and confirms that every configured endpoint is inside your environment. Add list:true to print every endpoint it checked. It exits non-zero if anything fails, so you can run it from your own monitoring.
Each component also has standard Kubernetes liveness and readiness probes. The API serves these paths on the arena-api Service, port 3001, inside the cluster. The ingress at the tenant’s domain doesn’t route them, so point in-cluster monitoring at http://arena-api.arena-tenant-a.svc:3001, or check by hand with kubectl -n arena-tenant-a port-forward svc/arena-api 3001:
Path |
Returns |
|---|---|
|
|
|
|
|
|
The readiness probe checks only Postgres. During an object store outage the API pod stays Ready, so your service still reaches it and gets an error that names the problem, such as 503 storage_unavailable, while /readyz returns 503. The API logs /readyz dependency check failed with the dependency that failed.
The GPU cluster’s state and the agent’s last contact time:
kubectl -n arena-tenant-a exec deploy/arena-api -- /usr/app/arena-cli task clusters_status
tenant-a-gpus Ready 8x nvidia-b300 agent 1.4.0 last contact 4s ago jobs running 1, queued 2
The state is Waiting until the agent first connects, Ready while it keeps polling without errors, Degraded when it stops polling or reports an error, and Disabled for a disabled cluster. The GPU count is that of the largest resource class of each GPU type in gpuCluster.classes. jobs running counts jobs that are training and jobs that have GPUs and are starting (Pending); queued counts jobs waiting for GPUs.
Logs¶
All components log to standard output, so your log tooling picks them up. Training and inference logs are also kept in the tenant’s OpenObserve, and your service can read them through the API next to metrics.
Upgrade¶
What you do
Read
RELEASE-NOTES.mdin the new bundle for the platform release, ML bundle and image versions it brings.Mirror the new images (once per release):
./arena-self-hosted-1.5.0/mirror-images.sh arena-self-hosted-1.5.0 registry.internal/arena
Upgrade each tenant with its existing values file:
helm upgrade arena arena-self-hosted-1.5.0/charts/arena-self-hosted-1.5.0.tgz \ -n arena-tenant-a -f tenant-a.yaml --wait --timeout 20m
Copy the agent values again, then upgrade the agent with them:
kubectl -n arena-tenant-a get secret arena-agent-values \ -o jsonpath='{.data.values\.yaml}' | base64 -d > agent-values.yaml helm upgrade arena-agent arena-self-hosted-1.5.0/charts/arena-byoc-agent-1.5.0.tgz \ -n arena-agent -f agent-values.yaml --set provisioner.enabled=false --wait
What happens
Each upgrade runs a new migration Job; the new API and worker pods restart until the schema matches, while the old ones keep serving. History, API keys, models, checkpoints and deployments carry over. Bootstrap and the self-check run again at the end of the upgrade. The self-check reports a GPU cluster whose agent has stopped reporting as warning, so you can upgrade the control plane while the GPU cluster is down.
Bootstrap keeps the key and the cluster registration while arena-partner-key and arena-agent-values still hold them. It brings the resource classes and node selector in line with the values file, and writes the new release’s agent and validator images into arena-agent-values; its log shows agent values updated in secret arena-agent-values. The cluster token doesn’t change, so the cluster-token Secret stays as it is. An agent upgraded with the previous release’s agent-values.yaml keeps running the previous release’s images, so always copy the values again first.
Each job and deployment runs in its own namespace on the GPU cluster, named arena-ent-train-<key>-<job> or arena-inf-<key>-<deployment>. The key is eight characters that differ for each GPU cluster registration, so two tenants’ agents in one Kubernetes cluster never pick the same name. The agent labels each namespace it creates with arena.agilerl.com/agent-namespace: <agent namespace>, and only removes a namespace that already has its own label. An unlabelled namespace is left in place. Jobs and deployments that were running before the release that added the key keep their old names (arena-ent-train-<job>, arena-inf-<deployment>). A deployment which was not installed yet (no phase, or still copying its checkpoint) is given the new name at upgrade. Upgrade both agents first. The upgraded agent adds its label to an unlabelled arena-ent-train-<id> or arena-inf-<id> when it next installs into it. Stop that job only after kubectl get namespace <name> --show-labels shows this agent’s arena.agilerl.com/agent-namespace label. Do not stop a shared id on the agent from before this release: that agent deletes arena-ent-train-<id> with no owner check. If two tenants share one unlabelled namespace, set the label to the agent namespace of the tenant that owns the workload before either upgraded agent stops the job. After the namespace is deleted, the next start of that deployment uses the keyed name.
To roll back, helm rollback to the previous revision. That brings back the previous charts and images but doesn’t undo database migrations. If the new release changed the schema, restore a backup taken before the upgrade instead.
Back up¶
A tenant’s state is its Postgres database, its bucket, and the Secret arena-secrets-key. Back up all three together. A restore without that Secret can’t read organisation secrets. Save the Secrets arena-partner-key and arena-agent-values with them, so a restored tenant keeps its API key and GPU cluster registration.
DAY=$(date +%F)
kubectl -n arena-tenant-a exec statefulset/arena-postgres -- \
sh -c 'pg_dump -U "$POSTGRES_USER" -Fc "$POSTGRES_DB"' > tenant-a-$DAY.dump
aws --endpoint-url https://s3.internal s3 sync s3://arena-tenant-a s3://backups/tenant-a/$DAY/
for s in arena-secrets-key arena-partner-key arena-agent-values; do
kubectl -n arena-tenant-a get secret $s -o json \
| jq 'del(.metadata.resourceVersion, .metadata.uid, .metadata.creationTimestamp, .metadata.managedFields, .metadata.ownerReferences)' \
> tenant-a-$s.json
done
The jq step drops the fields the cluster sets, so the Secrets can be applied to a fresh namespace. The files hold the tenant’s encryption key, its API key and the agent’s credentials: store them like any other secret.
If you use an external Postgres, back it up with your usual tooling.
Restore¶
Recreate the namespace and the Secrets your values file names (step 3 of Install a tenant), then install a fresh tenant with the same values file and restore on, which skips bootstrap. The install has already created the schema, so load the backup into an empty database: stop the Deployments and wait for their pods to exit, drop and create the database, restore, copy the bucket back, then start the Deployments again.
kubectl create namespace arena-tenant-a
kubectl -n arena-tenant-a create secret generic tenant-a-s3 \
--from-literal=accessKeyId=… --from-literal=secretAccessKey=…
kubectl -n arena-tenant-a create secret tls arena-tenant-a-tls --cert=tls.crt --key=tls.key
helm install arena charts/arena-self-hosted-1.4.0.tgz -n arena-tenant-a -f tenant-a.yaml \
--set arena-platform.restore=true --wait --timeout 20m
for s in arena-secrets-key arena-partner-key arena-agent-values; do
kubectl -n arena-tenant-a apply -f tenant-a-$s.json
done
kubectl -n arena-tenant-a get deploy \
-o jsonpath='{range .items[*]}{.metadata.name}={.spec.replicas}{"\n"}{end}' > tenant-a-replicas.txt
kubectl -n arena-tenant-a scale deploy --all --replicas=0
# Deployment pods carry pod-template-hash; the StatefulSets' pods, Postgres among them, don't.
until pods=$(kubectl -n arena-tenant-a get pods -l pod-template-hash -o name) && [ -z "$pods" ]; do
sleep 5
done
kubectl -n arena-tenant-a exec statefulset/arena-postgres -- \
sh -c 'dropdb -U "$POSTGRES_USER" --force "$POSTGRES_DB" && createdb -U "$POSTGRES_USER" "$POSTGRES_DB"'
kubectl -n arena-tenant-a exec -i statefulset/arena-postgres -- \
sh -c 'pg_restore -U "$POSTGRES_USER" -d "$POSTGRES_DB"' < tenant-a-2026-11-18.dump
aws --endpoint-url https://s3.internal s3 sync s3://backups/tenant-a/2026-11-18/ s3://arena-tenant-a
while IFS='=' read -r d n; do
kubectl -n arena-tenant-a scale deploy "$d" --replicas="$n"
done < tenant-a-replicas.txt
Each step exits 0, so they can run in a script with set -e. Don’t restore with pg_restore --clean over the installed schema instead: it can’t drop the keys of the audit log’s monthly partitions and exits 1.
A fresh install creates its own arena-secrets-key. Applying the backup replaces it, and the Deployments load that key when they start again. API keys, experiments, models, checkpoints, deployments and organisation secrets come back as they were at backup time. OpenObserve’s volume isn’t part of this backup, so live logs and metrics from before it aren’t restored. If the agent was removed too, install it again as in step 7 of Install a tenant.
Leave restore out of later upgrades. Bootstrap then runs again, finds the key and cluster from the backup, and keeps them.
Rotate the API key¶
Turn on bootstrap.rotateKey for one upgrade, then turn it off again:
helm upgrade arena charts/arena-self-hosted-1.4.0.tgz -n arena-tenant-a -f tenant-a.yaml \
--set arena-platform.bootstrap.rotateKey=true --wait --timeout 20m
kubectl -n arena-tenant-a get secret arena-partner-key -o jsonpath='{.data.key}' | base64 -d
helm upgrade arena charts/arena-self-hosted-1.4.0.tgz -n arena-tenant-a -f tenant-a.yaml \
--wait --timeout 20m
The bootstrap Job writes a new key to the Secret arena-partner-key, and its log shows when the old keys stop working (old api keys 1 valid until …). The old key keeps working for 24 hours, so your service can switch without downtime. To end it at once, also set arena-platform.bootstrap.revokeOld=true on the first upgrade; revokeOld without rotateKey fails the upgrade. Don’t leave rotateKey on: every upgrade would mint another key.
Change the private CA¶
Put the new CA’s PEM in arena-platform.tls.caBundle and run helm upgrade. Bootstrap writes it into the agent values in arena-agent-values. Copy the agent values again and upgrade the agent, as in step 7 of Install a tenant; the agent restarts with the new CA. Training and inference pods started after the upgrade trust it. While the old and new certificates overlap, put both CAs in the bundle.
Change a tenant’s GPUs¶
The tenant’s resources are the classes in arena-platform.gpuCluster.classes. To add one, for example b300-8x2 after adding a second node, add it to the list and run helm upgrade. Bootstrap creates new classes and updates changed ones in place, matched by name. Taking a class out of the list doesn’t delete it.
To point a tenant at different nodes, change arena-platform.gpuCluster.nodeSelector and run helm upgrade. Bootstrap applies the new selector to every class and to the agent values in arena-agent-values. Copy the agent values again and upgrade the agent, as in step 7 of Install a tenant, so the agent’s own pods move too.
Remove a tenant¶
What you do
helm uninstall arena-agent -n arena-agent --timeout 10m # on the GPU cluster
kubectl delete namespace arena-agent # on the GPU cluster
helm uninstall arena -n arena-tenant-a
kubectl delete namespace arena-tenant-a
aws --endpoint-url https://s3.internal s3 rm --recursive s3://arena-tenant-a
What happens
Uninstalling the agent stops every job and deployment on the GPU cluster. Before it removes itself, a hook Job (arena-byoc-agent-namespace-cleanup) first scales the agent to 0 and waits until its pod is deleted, then deletes every namespace labelled arena.agilerl.com/agent-namespace: arena-agent, the agent’s own namespace. That removes each job’s and deployment’s Helm release, pods, Roles, RoleBindings and the store Secret copied into it. The Job can run for 400 seconds, past Helm’s default 5 minute wait, so the command passes --timeout 10m and helm uninstall waits for the namespaces to go. If the hook fails, the agent stays scaled to 0; run the same helm uninstall --timeout 10m again. A retry that uses the default timeout deletes the Job while the namespace delete is still running. A namespace with no label is one from before the label existed and is not deleted: if kubectl get namespace -l '!arena.agilerl.com/agent-namespace' | grep -E 'arena-(ent-train|inf)-[0-9]+$' lists any, check they belong to this tenant and delete them. Uninstalling the control plane removes every Kubernetes object it created. The generated Secrets (arena-secrets-key, arena-postgres and the OpenObserve credentials) outlive helm uninstall and go with the namespace, as do the bundled Postgres, Pulsar and OpenObserve volumes. Deleting the bucket contents removes datasets, models and checkpoints. Nothing of the tenant remains anywhere else, since nothing was ever sent outside your environment.
Troubleshooting¶
API errors with a code have the body {"ok": false, "error": "<code>", "message": "…"}. Training submit streams its answer, so it reports run_does_not_fit and gpu_cluster_unavailable as detail.error_code on the final failed line instead of as an HTTP status. The Partner API reference lists every error your developers can see.
Symptom |
Cause |
Fix |
|---|---|---|
Pods stuck in |
Images not in your registry, or |
Run |
Install fails on the |
A dependency is down, or a value points outside your environment |
|
|
Agent can’t reach the API’s DNS name, doesn’t trust its certificate, or has no |
From a GPU node, call the partner API’s resources endpoint at |
No resources listed |
|
|
Training or inference pods stay |
No nodes match |
|
Jobs stay |
GPUs are taken by running jobs or deployments |
|
Pods can’t read the bucket |
The store Secret in |
It needs the same name as |
|
Object store unreachable or key wrong |
Check the endpoint and the key in the |
|
The object store doesn’t answer |
The API log line |
Dataset upload fails |
|
Upload again once |
Environment create fails, or an environment never validates |
|
Wait until |
|
The GPU cluster is disabled, never connected, or its agent has been silent for more than 3 minutes. The body has |
|
|
The run can never fit the resource it names, or any resource when it names none. The body has |
Change the run, or add a larger class to |
|
The request needed the Hugging Face Hub: dataset search, or a dataset from Hugging Face |
Upload the dataset file. Add base models as in Base models |
|
Key wrong, revoked, or from another tenant |
Read the current key from the Secret |
|
Not found in this tenant |
Check the name |
|
Rate limited |
Wait |