> For the complete documentation index, see [llms.txt](https://docs.openg2p.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openg2p.org/products/open-agri-stack/deployment/separate-clusters.md).

# Separate Clusters

Running Agri Stack's departments on their own clusters: reachable hostnames, domains, availability, upgrades and adding a department.

The installs on these pages already treat each namespace as a separate organisation, so the same charts and settings work when departments run on their own clusters, as the Crops Department's Crop Sown Registry does in the [topology](/products/open-agri-stack/deployment.md#topology). In addition:

| Topic                                      | What to do                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Hostnames reachable across departments** | From the Exchange: the Composite's API and the Exchange CM's public keys (`/.well-known/jwks.json` on its partner host, the only partner API path published; also the consent token status endpoint when **Expose Token Status Endpoint** is on, needed only if a department switches the status check on). From each department: its registry's partner API. Use public DNS names and trusted TLS for them |
| **Domains**                                | Each department CM finds the Exchange CM at `agrix.<parent of its own domain>`. On another cluster with another domain, set **Exchange Domain** in the department's Commons Services form (Consent Manager group)                                                                                                                                                                                           |
| **Registry URLs**                          | The Composite's **Farmer Registry Search URL** and **Crop Sown Registry Search URL** are the departments' public partner API URLs, as on one cluster                                                                                                                                                                                                                                                        |
| **Availability**                           | The Exchange depends on each department's partner API. Partner keys and catalogue reads are cached, and departments verify consent tokens offline with cached keys; only the optional status check (off by default) needs the Exchange CM per query, and then consent fails closed when it is down. Set timeouts and alerts                                                                                 |
| **Upgrades**                               | The Exchange and each department upgrade on their own schedules. Check the Composite, the CMs and the registries' partner APIs together after an upgrade ([Upgrades and Uninstall](/products/open-agri-stack/deployment/upgrades-and-uninstall.md))                                                                                                                                                         |
| **Exchange setup**                         | The [Exchange setup](/products/open-agri-stack/deployment/after-install.md#exchange-setup) uses **one** kubectl context for the Exchange and every department, so it reaches only departments in the Exchange's cluster. For a department on another cluster, set up the Composite there by hand (below)                                                                                                    |

## The Composite in a department on another cluster

The department's administrators do steps 3 and 4 of the [Composite's key and access](/products/open-agri-stack/deployment/exchange.md#the-composites-key-and-access): the Composite onboarded in their PM with its public key and `kid` (from the Exchange), and its scope policy for their registry; and their CM trusting the Exchange's consent tokens.

{% hint style="info" %}
**To be written:** running the Exchange setup against departments on other clusters (a kubectl context per department).
{% endhint %}

## Adding a department

1. Install its commons with **Exchange Role** `department`, and its registry ([Farmer Registry](/products/open-agri-stack/deployment/farmer-registry.md) and [Crop Sown Registry](/products/open-agri-stack/deployment/crop-sown-registry.md) show the pattern).
2. Add the registry to the Composite (`composite.registries`, in **Edit YAML**) and to the use cases that read it ([adding a data source](/products/open-agri-stack/exchange/composite/adding-a-data-source.md)).
3. Rerun the [Exchange setup](/products/open-agri-stack/deployment/after-install.md#exchange-setup) with the new `--registry <controller>=<namespace>` (same cluster), or set up the Composite in it by hand (another cluster, above).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openg2p.org/products/open-agri-stack/deployment/separate-clusters.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
