Use the CLI to add a self-managed region

The tb infra init command helps you set up the requirements for a self-managed region and deploy the Tinybird Local container on your cloud provider.

When you run tb infra init, the command:

  1. Registers a new self-managed region with Tinybird Cloud.
  2. Generates infrastructure-as-code files for your chosen cloud provider: A certificate in AWS Certificate Manager and the necessary DNS records in Route 53 for validating the certificate.
  3. Generates a Kubernetes configuration file to deploy the container on your EKS cluster with the correct environment variables. The command prompts you for the Kubernetes context to use, the namespace to create the deployment in, and the storage class to use.
  4. Optionally, it applies these configurations to create the necessary resources.

This automated approach significantly reduces the manual steps required to set up a self-managed region, especially on AWS where it handles certificate management, DNS configuration, and Kubernetes deployment.

Self-managed regions are currently in beta. Use them for development environments only; avoid production workloads. Features, requirements, and implementation details might change as we continue to improve this capability.

Supported clouds

The following cloud service providers are supported:

  • AWS
  • GCP (Coming soon)
  • Azure (Coming soon)

Use tb infra init

Follow these steps to create a self-managed region using tb infra init.

1

Check the requirements

To run the tb infra init command, you need to have the following.

The following tools are required to deploy Tinybird Local on AWS:

Before initiating deployment, you need to set up the following in AWS:

  • A zone and domain name in Route53 zone.

    • Write down the hosted zone name and the zone ID for your domain.
  • An EKS cluster with the following components:

    • AWS Load Balancer Controller installed.
    • external-dns configured.
    • Both components need sufficient permissions to manage resources.
    • Optionally, set a storage class in the EKS cluster with high IOPS and throughput.
2

Log into Tinybird Cloud

Log into Tinybird Cloud using the tb login command.

tb login
3

Run tb infra init

Run tb infra init to set up the requirements for a self-managed region and deploy Tinybird Local on your cloud provider.

tb infra init

The command requires the following information:

When prompted, enter the following information from the first step:

  • AWS region. For example, us-east-1.
  • DNS zone name. For example, example.com.
  • DNS record name. For example, tinybird
  • The Kubernetes context to apply the changes on.
  • Kubernetes namespace. For example, default.
  • EKS storage class. For example, gp3-encrypted.

Review the changes before applying them. To generate the files without applying them, use the --skip-apply flag.

After the deployment is complete, tb infra shows the URL to access your Tinybird Local instance.

4

Log into your instance

Navigate to your Tinybird project and run tb login --host <host>, where <host> is the host of your self-managed region that you set up in the previous step.

tb login --host https://<host>
5

Use your instance

After you're logged in, you can run commands against it using the --cloud flag.

tb --cloud workspace ls 

Troubleshooting

If you encounter issues with your self-managed region:

  • Check the container logs for error messages.
  • Verify that all required environment variables are set correctly.
  • Ensure your network configuration allows the necessary connections.
  • Confirm that your persistent volumes are properly mounted and have sufficient space.
  • For connectivity issues, verify that your HTTPS endpoint is properly configured.

For additional help, contact Tinybird support with details about your deployment.

Updated