Quick Start

Get your first Teabar environment running in under 5 minutes. This guide walks you through installing the CLI, authenticating, and deploying a fully functional Kubernetes cluster.

Prerequisites

Before you begin, make sure you have:

RequirementDetails
Teabar accountFree tier works fine for this tutorial
Operating systemmacOS, Linux, or Windows with WSL2
Terminalbash, zsh, or PowerShell
Internet connectionRequired for downloading and provisioning

Step 1: Install the CLI

The teactl command-line tool is how you interact with Teabar. Choose your preferred installation method:

Quick Install (Recommended)

The fastest way to install is using our install script:

curl -fsSL https://teabar.dev/install.sh | sh

Windows (PowerShell):

iwr https://teabar.dev/install.ps1 -UseBasicParsing | iex

This script:

  • Detects your operating system and architecture
  • Downloads the appropriate binary
  • Installs it to /usr/local/bin (or ~/.local/bin if no sudo)
  • Verifies the installation

Verify Installation

Confirm the installation was successful:

teactl version

You should see output like:

{
  "version": "dev",
  "commit": "unknown",
  "buildDate": "unknown",
  "goVersion": "go1.x.x",
  "os": "windows",
  "arch": "amd64"
}

Step 2: Authenticate

Connect the CLI to your Teabar account:

teactl auth login

This opens your default browser to complete authentication. After logging in, you’ll see:

Opening browser for authentication...

✓ Authentication successful
✓ Logged in as [email protected]
✓ Default organization: my-org

Configuration saved to ~/.teabar/config.yaml

Verify Authentication

Check that you’re properly authenticated:

teactl auth status

Expected output:

API URL: https://api.teabar.dev

Authentication: Valid (via TEABAR_TOKEN environment variable)

Step 3: Deploy Your First Environment

Now let’s create a real Kubernetes cluster. We’ll use the kubernetes-basic blueprint, which provisions:

  • 1 control plane node
  • 2 worker nodes
  • Pre-configured networking (Calico CNI)
  • Metrics server for resource monitoring

Create the Environment

teactl env create --blueprint kubernetes-basic --name my-first-env

You’ll see real-time progress as Teabar provisions your infrastructure:

Creating environment 'my-first-env'...

  ⠋ Validating blueprint configuration
  ✓ Blueprint validated (kubernetes-basic v1.2.0)

  ⠋ Provisioning infrastructure
  ✓ VPC and networking configured
  ✓ Security groups created
  ✓ Control plane instance launched
  ✓ Worker instances launched (2/2)

  ⠋ Configuring Kubernetes cluster
  ✓ Kubernetes control plane initialized
  ✓ Worker nodes joined cluster
  ✓ CNI networking deployed
  ✓ CoreDNS running

  ⠋ Setting up access credentials
  ✓ Kubeconfig generated
  ✓ Access credentials saved

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Environment 'my-first-env' is ready!

  Status:     ready
  Created:    2024-01-15 10:35:42 UTC
  Duration:   3m 42s
  Blueprint:  kubernetes-basic v1.2.0

  Nodes:
    • my-first-env-master-1  (control-plane, ready)
    • my-first-env-worker-1  (worker, ready)
    • my-first-env-worker-2  (worker, ready)

  Access:
    kubectl --kubeconfig ~/.teabar/envs/my-first-env/kubeconfig get nodes

  Dashboard:
    https://app.teabar.dev/envs/my-first-env

Monitor Progress

If you want to watch the creation in a separate terminal:

teactl env status my-first-env --watch

Step 4: Access Your Environment

Teabar automatically generates a kubeconfig file with credentials to access your cluster.

Option A: Export KUBECONFIG

Set the environment variable to use your new cluster:

export KUBECONFIG=~/.teabar/envs/my-first-env/kubeconfig

Now all kubectl commands will target your Teabar environment:

kubectl get nodes

Output:

NAME                    STATUS   ROLES           AGE   VERSION
my-first-env-master-1   Ready    control-plane   5m    v1.28.4
my-first-env-worker-1   Ready    <none>          4m    v1.28.4
my-first-env-worker-2   Ready    <none>          4m    v1.28.4

Option B: Use –kubeconfig Flag

Alternatively, specify the kubeconfig per command:

kubectl --kubeconfig ~/.teabar/envs/my-first-env/kubeconfig get pods -A

Option C: Merge with Existing Config

If you have existing Kubernetes clusters, you can merge the configs:

teactl env kubeconfig my-first-env --merge

Then switch contexts:

kubectl config use-context teabar-my-first-env

Step 5: Deploy a Sample Application

Let’s deploy a simple web application to verify everything works:

# Create a deployment
kubectl create deployment hello-world --image=nginx:alpine

# Expose it as a service
kubectl expose deployment hello-world --port=80 --type=NodePort

# Check the deployment
kubectl get pods,svc

Output:

NAME                              READY   STATUS    RESTARTS   AGE
pod/hello-world-6d4f5b8b9-x7z2m   1/1     Running   0          30s

NAME                  TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
service/hello-world   NodePort    10.96.123.45    <none>        80:31234/TCP   15s
service/kubernetes    ClusterIP   10.96.0.1       <none>        443/TCP        6m

Access the Application

Get the node IP and access your application:

# Get the node external IP
teactl env info my-first-env --output json | jq -r '.nodes[0].external_ip'

# Or use port-forward for quick access
kubectl port-forward svc/hello-world 8080:80

Open http://localhost:8080 in your browser to see the nginx welcome page.

Step 6: Explore Your Environment

View Environment Details

teactl env info my-first-env
Environment: my-first-env
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Status:      ready
Blueprint:   kubernetes-basic v1.2.0
Created:     2024-01-15 10:35:42 UTC
Running for: 15 minutes

Resources:
  Nodes:     3 (1 control-plane, 2 workers)
  vCPUs:     6 total
  Memory:    12 GB total
  Storage:   60 GB total

Networking:
  VPC CIDR:      10.0.0.0/16
  Pod CIDR:      10.244.0.0/16
  Service CIDR:  10.96.0.0/12

Cost:
  Rate:      $0.15/hour
  Accrued:   $0.04 (this session)

SSH to Nodes (Optional)

If you need direct access to the nodes:

# SSH to control plane
teactl env ssh my-first-env --node master-1

# SSH to a worker
teactl env ssh my-first-env --node worker-1

View Logs

Check environment provisioning logs:

teactl env logs my-first-env

Step 7: Clean Up

When you’re done experimenting, destroy the environment to stop billing:

teactl env destroy my-first-env

You’ll be prompted to confirm:

Are you sure you want to destroy 'my-first-env'?
This action cannot be undone. All data will be lost.

Type the environment name to confirm: my-first-env

Destroying environment 'my-first-env'...
  ✓ Kubernetes cluster terminated
  ✓ Worker instances terminated
  ✓ Control plane terminated
  ✓ Networking resources deleted
  ✓ Local credentials removed

Environment 'my-first-env' has been destroyed.
Total cost: $0.12

Skip Confirmation (Scripting)

For scripts and automation, you can skip the confirmation prompt:

teactl env destroy my-first-env --yes

Troubleshooting

“Command not found: teactl”

The CLI isn’t in your PATH. Try:

# Check where it was installed
which teactl || ls ~/.local/bin/teactl || ls /usr/local/bin/teactl

# Add to PATH if needed
export PATH="$PATH:$HOME/.local/bin"

“Authentication failed”

Your session may have expired. Re-authenticate:

teactl auth logout
teactl auth login

“Blueprint not found”

Make sure you’re using the correct blueprint name:

# List available blueprints
teactl blueprint list

# Search for kubernetes blueprints
teactl blueprint search kubernetes

“Insufficient quota”

Your organization may have reached its environment limit:

# Check quota usage
teactl org quota

# Contact your org admin or upgrade your plan

Environment Stuck in “Creating”

If your environment takes longer than 10 minutes:

# Check detailed status
teactl env status my-first-env --verbose

# View provisioning logs
teactl env logs my-first-env --follow

If it’s truly stuck, you can cancel and retry:

teactl env destroy my-first-env --force
teactl env create --blueprint kubernetes-basic --name my-first-env

What You’ve Learned

Congratulations! You’ve successfully:

  • Installed the Teabar CLI
  • Authenticated with your account
  • Created a fully functional Kubernetes cluster
  • Deployed a sample application
  • Cleaned up resources

Next Steps

Now that you’re comfortable with the basics, explore more:

GuideDescription
Installation GuideMore installation options and configuration
First Training SessionSet up environments for multiple participants
Blueprint BasicsUnderstand how blueprints work
CLI ReferenceComplete command reference
Community BlueprintsGitLab CI/CD, ArgoCD, and more
ende