Managed BYOC Setup

This guide takes you from an empty cloud account to a running Managed BYOC cluster. Work through the runlist in order and check off each step as you go. Before you start, check the requirements and size your cluster.

For each cluster, turbopuffer provides a Managed BYOC kit. You apply a small bootstrap, and a jump host in your account then builds the cluster for you. The turbopuffer team reaches the jump host over outbound-only SSH through Teleport, and all access is logged and audited.

Your kit contents

byoc-managed-kit
├── README.md
├── cosign.pub
├── aws
│   ├── README.md
│   ├── bootstrap                       # phase 1, applied by you
│   │   ├── main.tf
│   │   ├── iam_*.tf                    # identities turbopuffer works under
│   │   ├── backend.hcl
│   │   └── turbopuffer.tfvars
│   ├── cluster                         # phase 2, applied by turbopuffer
│   │   ├── main.tf
│   │   ├── byoc-provision.sh
│   │   ├── policies
│   │   ├── metrics-keys.yaml           # configuration file provided by turbopuffer
│   │   ├── turbopuffer.tfvars.json     # configuration file provided by turbopuffer
│   │   └── values.secret.yaml (generated) # sensitive configuration file generated by generate-secrets.py
│   └── cluster-core
├── gcp
│   ├── bootstrap
│   └── cluster
├── azure
│   ├── bootstrap
│   └── cluster
└── scripts
    ├── apikey.py
    ├── generate-secrets.py
    └── sanity.sh

Runlist

  1. Prerequisites: Check you have everything you need:
    • Verify you have terraform, python3, and the gcloud CLI installed.
    • Provision a fresh sub-account / project for your new cluster, with administrator access to it.
    • Provide us with your project ID. We use it to scope the jump host's SSH enrollment.
  2. Bootstrap configuration: Fill in the required values in gcp/bootstrap/turbopuffer.tfvars. The Teleport values are pre-filled by turbopuffer.
  3. Generate API keys: cd gcp/cluster, then run python3 ../../scripts/generate-secrets.py to generate values.secret.yaml. The script will generate an org ID and API key, along with a token for intra-cluster communication.
    • The API key is printed once. Save it. Only its hash is written to disk, so turbopuffer never sees the key.
    • Return to the kit root: cd ../..
  4. Create the state bucket: Create the bucket that holds the bootstrap Terraform state and the kit. See creating the state bucket. It stays yours, and every turbopuffer identity is denied access to the state object.
    • Fill in gcp/bootstrap/backend.hcl to point the bootstrap at it.
  5. Apply the bootstrap: As an account administrator, cd gcp/bootstrap, then run terraform init -backend-config=backend.hcl and terraform apply -var-file=turbopuffer.tfvars.
    • This builds the network, the identities turbopuffer works under, the data bucket, and the jump host. It also opens the install window so the cluster can install without further input.
    • Save the Terraform outputs. They include the commands to close and reopen the install window.
    • Return to the kit root: cd ../..
  6. Notify turbopuffer: Tell the turbopuffer team the bootstrap is applied. The jump host registers with turbopuffer and builds the cluster automatically, which takes about 20 to 30 minutes. The turbopuffer team monitors the provisioning and confirms when the cluster is healthy.
  7. Run post-deployment sanity checks: TURBOPUFFER_API_KEY=<your_api_key> scripts/sanity.sh will query your turbopuffer cluster directly, verifying that core operations function.
  8. Close the install window: Once turbopuffer confirms the cluster is healthy, run the install_window_close command from the bootstrap outputs. The window stays closed until you reopen it with install_window_open, and nothing turbopuffer runs can reopen it.
  9. Get access to monitoring: Ask the turbopuffer team for access to your cluster's Datadog dashboard. See Monitoring.

Your cluster is now running. turbopuffer operates it and applies configuration changes for you. Operations covers monitoring and day-to-day tasks, and Configuration lists the settings you can ask us to change.

Creating the state bucket

Create the state bucket with versioning and public access prevention. Replace <state_bucket_name>, <project_id>, and <region> with the values from your turbopuffer.tfvars.

gcloud storage buckets create gs://<state_bucket_name> --project <project_id> \
  --location <region> --uniform-bucket-level-access --public-access-prevention
gcloud storage buckets update gs://<state_bucket_name> --versioning

Then point the bootstrap at it in gcp/bootstrap/backend.hcl:

bucket = "<state_bucket_name>"
prefix = "bootstrap"

Permissions

Everything turbopuffer can and cannot do in your account is defined by four identities that you create as an account administrator. The jump host holds no permissions itself. When a member of the turbopuffer team logs in, they act as one of the identities below. Each identity has one job and their usage is reflected in your cloud audit logs.

IdentityJobAvailable
DeployerBuilds and operates the cluster infrastructureAlways
InstallerCluster-admin inside the Kubernetes clusterOnly while the install window is open
OpsOperational kubectl accessAlways
UpgraderRuns helm upgrade for the turbopuffer chartAlways

The exact roles and policies are defined in the bootstrap module of your kit. Contact us for a detailed permissions overview.

Deployer

After you apply the bootstrap, the jump host builds your cluster unattended. The deployer identity builds and maintains the Kubernetes cluster and manages node autoscaling. The deployer is always available, but it works only through your cloud provider's API and cannot reach the Kubernetes API. Changes to in-cluster objects are applied by the installer and need the install window. The deployer is denied all access to your data bucket and cannot change its own permissions or those of the other identities.

Installer

The initial cluster creation requires cluster-admin inside the Kubernetes cluster. The installer holds this capability and is only usable while the install window is open. After the bootstrap completes, the window is open so the cluster can install without further input. Once turbopuffer confirms the cluster is healthy, you close it with the install_window_close command from the bootstrap outputs. A closed window stays closed until you open it again, and nothing turbopuffer runs can reopen it.

When is the window needed?

A task needs the window only when it requires cluster-admin. Infrastructure changes through your cloud provider's API, day-2 kubectl, and chart upgrades run as the standing identities with the window closed.

TaskRuns asNeeds the window?
Kubernetes version upgrade, add-on updates through the cloud provider's APIDeployerNo
Network, load balancer, or state bucket changesDeployerNo
turbopuffer product upgrade, reindex, restart, scaleThe in-cluster control plane agent. Not performed from the jump host.No
Day-2 kubectl: inspect, read logs, recycle pods, rollout restart, bump a workload image, adjust node pools and HPAsOpsNo
Helm upgrade of the turbopuffer chartUpgraderNo
Full terraform apply of the cluster phase, including in-cluster RBAC and admission policiesDeployer for cloud resources. Installer for in-cluster objects.Yes
First Helm install of the turbopuffer chartInstallerYes
Break-glass: exec into a pod, anything cluster-adminInstallerYes

Ops

turbopuffer operates the cluster day to day, whether responding to a page, investigating a slow query, or fixing a stuck rollout. The ops identity is primarily read-only, aside from a small set of actions to resolve issues. It can fetch a kubeconfig for this cluster, and all in-cluster authorization comes from the byoc-jumphost-ops Kubernetes role:

CapabilityAllowedNote
get, list, watchYes
Read secretsNo
pods/logYesRead-only log access.
pods/exec, pods/portforwardNo
Create podsNo
Delete podsYesRecycles pods. The controller replaces them.
patch and update deployments, statefulsets, daemonsetsYesRollout restart and routine config changes in the turbopuffer namespace. Images are limited by the provenance policy below.
patch and update node pools and HPAsYesIncident-time capacity edits.

Upgrader

turbopuffer ships changes to the cluster at a regular cadence, more often than you would want to schedule an install window. The upgrader exists so a routine chart upgrade is deployable without the install window. It only manages the turbopuffer Helm chart. It can fetch a kubeconfig for this cluster, and all in-cluster authorization comes from the byoc-helm-upgrader Kubernetes role. That role can read everything on the cluster, including Kubernetes Secrets, and write the resource kinds the turbopuffer Helm chart ships. The other secrets are credentials turbopuffer issued and the token for intra-cluster communication. The role is denied the following:

WithheldWhy
pods/exec, pods/portforwardPotential for data exposure.
Validating admission configurationThe upgrader cannot lift the image provenance policy.
escalate, bind, impersonateThe chart's own RBAC objects must stay within these grants. A chart that outgrows them fails the upgrade.

If required, you can revoke this identity and coordinate Helm changes with turbopuffer by hand. The bootstrap outputs include upgrader_revoke and upgrader_restore commands for this.

Additional controls

Workload identities

Access to your data is concentrated in the workload identities used by the data plane pods. Each is reachable only from its Kubernetes service account in the turbopuffer namespace. No other identity in the deployment can read your data.

Workload image provenance

The workload identities used by the turbopuffer deployment are the only identities with the capability to reach your data. An admission policy in the cluster ensures that only images from turbopuffer's registry can run as a workload identity.