Skip to main content
Details behind the GCP steps in Prerequisites and Install. On GCP, Tembo runs on GKE and launches agent hosts as Compute Engine instances in your VPC. Starting from an empty project? The module’s complete example creates a VPC with a subnetwork for hosts, Cloud NAT with dynamic port allocation, and a private GKE Autopilot cluster that hosts can reach.

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.com and storage.googleapis.com.
If 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.disableNestedVirtualization not enforced on the hosts’ project: hosts run agents in VMs.
  • compute.requireShieldedVm not 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 leave kubectl hanging:
This needs 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:
This flag replaces the allowlist: include every node, pod and administrator range that must keep access. Hosts in a different region than the cluster need the control plane’s global access. Keep these settings in your Terraform if it manages the cluster.

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.
The module reads the subnetwork and doesn’t change it. It creates the firewall rule that lets the cluster’s pods and nodes reach the hosts’ manager on port 8743; for a Shared VPC subnetwork, in the network’s host project.

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.
Check limits and request increases in Quotas & System Limits. If a request only says Quota request denied, check the console for the reason. On a quota-limited project, start with one host. Add this to your values.yaml:
Leave room for your cluster’s nodes and node upgrades, and for a replacement host while hosts are replaced. For example, a 48-vCPU project fits one host plus a Standard zonal cluster capped at three 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, plus roles/container.clusterViewer. Editor isn’t enough: it can’t create the controller’s custom roles or set IAM on the subnetwork.

The Terraform module

The tembo-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.
The service accounts trust only the chart’s service accounts in 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-65536 with four local SSDs, and Tembo’s stable agent host image.
  • A pool named default, of one to three hosts.
  • Object storage, with the bucket and the control plane’s service account.
The Install example adds loadBalancerSourceRanges for the bundled Postgres and Redis, from the module’s host_subnetwork_cidr output, so only agent hosts can reach them.

Need Help?

If you run into any issues, contact support@tembo.io.