Clusters
Where a namespace runs — the platform's fleet or a cluster your team registers — and how placement, sharing and capacity work.
Every namespace runs on exactly one cluster. By default that is the platform's own fleet, and you never have to think about it. A team can also register a cluster of its own, install the platform's operator on it, and place namespaces there — bring your own cluster. The API is the same either way; only where the pods land changes.
What a cluster is
A cluster is one operator install: one enrolment, one credential, one owner team. Two teams installing on the same physical Kubernetes cluster register two clusters, and the platform treats them independently.
| Field | Meaning |
|---|---|
cluster_id | cl-…, assigned on create |
owner_team | The team that administers it. Empty for the platform's own fleet. |
visibility | Who may place a namespace here: PRIVATE, SHARED or GLOBAL |
grants | Per-team permission to place here, with optional caps on capacity |
default | Where a namespace lands when nothing names a cluster. At most one, always GLOBAL. |
state | PENDING until an operator connects, then CONNECTED or DISCONNECTED from its heartbeat |
capabilities | What the operator reports: gVisor, the volume driver, whether it serves previews and Apps on its own domains (preview_domain, app_domain), nested_containers (a node runs the runc-nested handler), node_shares (the node shares ready on at least one node) and memory_mounts |
capacity | What the operator last observed, per node: allocatable CPU, memory and pods, and what this install's workloads request of them; with the install cap the cluster admin set (install_cap) and what the install's namespaces' quotas add up to against it (install_requested). Read-only; unset until an operator connects. |
conditions | What is wrong now, as the operator reports it: CAPACITY while workload pods cannot be scheduled, with the scheduler's message, since when, and the pods. Cleared when it stops being reported. |
release | The release the install reports running: operator_tag (the operator, egress and preview-proxy image tag), csi_tag (the volume driver's), and the operator_chart_version and prereqs_chart_version it was installed with. A part the install cannot report is empty. Read-only. |
desired_release | The release the platform wants the install on, in the same shape. A part the platform does not state is empty. Read-only. |
archive_interval_sec | How often mounted persistent volumes are archived: unset is the platform's default (6 hours), 0 turns scheduled archives off |
archived_bytes | Bytes archived from the cluster's volumes so far: the archive traffic over the cluster's uplink |
labels | Free-form hints such as region or provider. The platform does not act on them. |
Placement
A namespace chooses its cluster when it is created, with CreateNamespaceRequest.cluster_id. Leaving it empty resolves in order: the owner team's default cluster (TeamSettingsService), then the platform's default. Moving it later is MoveNamespace (below), not an update.
The team must be able to place on the cluster:
| Visibility | Who may place |
|---|---|
PRIVATE | The owner team only |
SHARED | The owner team and every team holding a grant |
GLOBAL | Every team |
A cluster you cannot see is reported as NotFound; one you can see but may not place on is PermissionDenied. A PENDING cluster, or one without gVisor that has not been explicitly allowed to run without it, is FailedPrecondition.
Grants and capacity
A grant names a team and caps what that team's namespaces on the cluster may hold in total: CPU, memory, pods, storage and volumes. The sum of the team's namespace quotas on the cluster must fit; a request past it is ResourceExhausted and says which dimension. A zero cap is no cap.
What each team holds against its grant is on the cluster as grant_usage: one row per team with a grant or a namespace there, each the summed quotas of its namespaces on the cluster. The owner team's admins and platform admins see every team's row; a member of another team sees only its own.
Three cases decide how a team admin may set quotas:
- The team's own cluster. Unbounded. Size namespaces as you like.
- A grant with caps. A budget: quotas must fit the remainder.
- A
GLOBALcluster with no everyone-grant — the platform's fleet as it ships. Namespaces receive the default quotas and a team admin cannot change them; a platform admin can.
Quotas left at zero take the defaults: 4000 mCPU, 8192 MB memory, 16 pods, 50 GiB storage and 20 volumes. A cluster without the volume driver takes no volumes: the storage and volume quotas default to zero there, and asking for them is refused.
An install's own cap — set by the cluster admin in the operator chart's capacity values — bounds the namespaces on it as a whole. A namespace whose quota would take the install past it is refused with ResourceExhausted naming the dimension, whoever asks.
Moving a namespace
MoveNamespace moves a namespace and its persistent volumes to another cluster its team may place on. It has downtime, so it is its own call with progress on Namespace.move:
- Draining — new workloads are refused, sandboxes are suspended, apps scale to zero, running jobs get up to 15 minutes and are then cancelled.
- Archiving — each persistent volume is archived into the workspace store.
- Switching — the namespace is placed on the target and provisioned there.
- Restoring — each persistent volume is set to be populated from its archive on its first mount on the target (it keeps its id); cache and scratch volumes are dropped and rebuilt on use; the source's copy is removed.
- Resuming — apps return to their replicas. Sandboxes stay suspended until resumed.
Send dry_run: true first: nothing starts, and move.estimated_downtime_sec estimates the downtime from the volumes' last archive times. A failure before the volumes are re-seeded rolls the namespace back to its source (move.rolled_back). While a move runs, workload calls in the namespace and UpdateNamespace/DeleteNamespace return FailedPrecondition. Moving needs an admin of the owner team (or a platform admin), so a namespace API key cannot start one.
Volumes and archives
A CreateVolume with seed_snapshot_id (a snapshot of the same namespace) is populated from that snapshot before the first workload that mounts it starts; until then pending_seed_snapshot_id names it.
Mounted persistent volumes are archived every 6 hours by default, and an idle one about 10 minutes after it goes quiet. On a cluster you own the archive crosses your uplink, so you set the schedule: UpdateCluster with archive_interval_sec (15 minutes to 7 days, or 0 to turn scheduled archives off; named in the mask with no value it returns to the default). On a GLOBAL cluster it is a platform-admin setting.
Previews and Apps on your own domain
By default a cluster's sandbox previews and App hostnames live under the platform's domains and their traffic is relayed to the cluster through the platform. An install can serve them on your own domains instead, from your ingress (the operator chart's previewProxy.ingress). Its operator then reports capabilities.preview_ingress / app_ingress with the domains, ExposePort URLs and App hostnames for namespaces on that cluster use them, and a request that still reaches the platform's domain is redirected.
Running without gVisor
Workloads run under gVisor unless their environment is RUNC, and RUNC starts only where it is permitted: on a cluster a platform admin marked allow_runc, or — on a cluster your own team owns — in a namespace with allow_runc set. The second is the owner's call on hardware the owner runs, so your team's admins set it (CreateNamespace or UpdateNamespace; unset on an update keeps it) and nobody else's namespaces on your cluster get it. A cluster can therefore run gVisor and runc namespaces side by side. The permission is checked whenever a pod starts, so a namespace that is no longer on its team's cluster loses it. Nested containers and MODE_OPEN both need it.
Keeping an install current
The platform states the release each install should run as desired_release, and the operator reports what it runs as release. Where a part of both is set and they differ, the install has fallen behind: the console marks the cluster update due and lists each part with the version wanted. The operator image tag follows the platform's own release; upgrade the operator chart with images.tag set to desired_release.operator_tag, and the cluster prerequisites with the cp-csi tag in desired_release.csi_tag.
An install managed by Flux can follow the platform instead. Set the operator chart's release.configMap to a ConfigMap you create beside your HelmReleases, and the operator writes the release the platform wants into it on every heartbeat, as Helm values for each chart. Both HelmReleases read it with valuesFrom, so Flux upgrades the install when the platform releases, and rolls an upgrade back if it fails. The operator can update that one ConfigMap and nothing else. The operator chart's README has the ConfigMap and HelmRelease to copy.
Registering a cluster
CreateClusterwith a display name and your team. The record isPENDINGandPRIVATE.CreateEnrolmentTokenmints a one-time secret, valid for 15 minutes and returned once. The operator presents it on first start and receives the cluster's own credential; from then on the cluster readsCONNECTED.- Place namespaces on it, or make it your team's default with
SetTeamDefaultCluster.
Share it with UpdateCluster: set visibility to SHARED and list the grants. Only the fields named in update_mask change. GLOBAL visibility, default and allow_runc are platform-admin settings, as is archive_interval_sec on a GLOBAL cluster.
Re-enrolling (a new enrolment token for a running install) rotates the cluster's credential, the egress proxy's events token and its pull credential for built environment images; the install picks the new values up without a restart.
DeleteCluster removes the record and its enrolment tokens. It is refused while namespaces are placed on the cluster unless force is set, and always for the default cluster.
Access
| Call | Who |
|---|---|
GetCluster, ListClusters | Members of the owner team or a granted team; anyone for a GLOBAL cluster; a namespace API key for the cluster its namespace is on |
CreateCluster | An admin of the owner team, or a platform admin |
UpdateCluster, DeleteCluster, CreateEnrolmentToken | An admin of the owner team, or a platform admin |
GetTeamSettings | Any member of the team |
SetTeamDefaultCluster | An admin of the team |
MoveNamespace | An admin of the namespace's owner team, or a platform admin |
The mutations and MoveNamespace need a team role, so a namespace API key cannot call them, as it cannot call CreateNamespace.