Projects and APIs
- A project for agent hosts. The host controller can create instances anywhere in the hosts’ project, and change or delete only its own. We recommend a project of its own: set it as the module’s
host_project_id. Otherwise hosts run in the cluster’s project. - APIs enabled in those projects:
compute.googleapis.com,iam.googleapis.com,iamcredentials.googleapis.comandstorage.googleapis.com.
gcloud reports RESOURCE_EXHAUSTED for Resource Manager reads against a shared consumer project, use a project you control for CLI quota. You need serviceusage.services.use on it:
Organization policies
compute.disableNestedVirtualizationnot enforced on the hosts’ project: hosts run agents in VMs.compute.requireShieldedVmnot enforced: the agent host image boots with legacy BIOS.- If you restrict
compute.trustedImageProjects, allow Tembo’s image project,projects/tembo-prod.
Control-plane access
The cluster must be VPC-native (Autopilot or Standard) with Workload Identity. Autopilot clusters always have it. Administrators should use the cluster’s DNS endpoint. An IP endpoint with an empty authorized-networks allowlist can leavekubectl hanging:
container.clusters.connect and the gke-gcloud-auth-plugin.
Agent hosts read their configuration through the cluster’s private IP endpoint. If it enforces master authorized networks, add the hosts’ subnet:
VPC and subnetwork
Agent hosts launch into a subnetwork you choose, in the cluster’s VPC. Hosts have no external addresses, so they need:- Private Google Access, for Cloud Storage and IAM.
- Cloud NAT, for egress to your Tembo URL, Tembo’s API, model providers and code hosts such as GitHub.
- Your own Postgres or Redis, if you use them, must accept connections from the subnetwork. Hosts reach the bundled ones through internal load balancers.
Cloud NAT
A host carries the egress of every session on it, and Cloud NAT’s default of 64 ports per VM runs out with a couple of sessions. Turn on dynamic port allocation, with at least 1,024 ports per VM:Quotas
Each host needs 32 vCPUs and 1,500 GB of local SSD, times the pool’s maximum hosts (three by default). Free Trial billing accounts can’t run a single host or request more quota.- N2 CPUs and local SSD in the hosts’ region.
- Persistent Disk SSD in the hosts’ region: each host’s 100 GB boot disk counts, as do GKE’s node disks. New projects can have as little as 250 GB.
- CPUs (all regions), a project-wide limit that also counts the cluster’s nodes. New projects can have as few as 12 vCPUs, not enough for one host.
Quota request denied, check the console for the reason.
On a quota-limited project, start with one host. Add this to your values.yaml:
e2-standard-4 nodes. Autopilot scales its nodes automatically; use Standard with a capped node pool when you need a predictable CPU budget.
Permissions to apply
Apply the module as the projects’ Owner, or with these roles, plusroles/container.clusterViewer. Editor isn’t enough: it can’t create the controller’s custom roles or set IAM on the subnetwork.
The Terraform module
Thetembo-agent-host module for Google Cloud needs Google provider 6.0 or later. It creates:
- The host controller’s service account, bound to the chart’s service account with Workload Identity. It can change and delete only instances and disks named with your install’s prefix, launch them only into your subnetwork, and attach only the hosts’ service account.
- The agent hosts’ service account, with access to the install’s bucket.
- The firewall rule for the hosts’ manager.
- A GCS bucket for project images, session snapshots and file uploads, and the control plane’s service account to use it. To use a bucket you have, set
object_storage_bucket_name.
kubernetes_namespace, for release_name. See the module’s README for the other options, such as machine_types.
Its helm_values output configures the chart with:
- GKE’s Ingress (
ingress.gcp). - The host controller, with its service account, the hosts’ project and your install’s instance name prefix.
- A host class named
default, with your subnetwork, the hosts’ service account,n2-custom-32-65536with four local SSDs, and Tembo’sstableagent host image. - A pool named
default, of one to three hosts. - Object storage, with the bucket and the control plane’s service account.
loadBalancerSourceRanges for the bundled Postgres and Redis, from the module’s host_subnetwork_cidr output, so only agent hosts can reach them.