Deploy Bytebot on Kubernetes with Helm

Helm provides a simple way to deploy Bytebot on Kubernetes clusters, with full control over resource allocation and configuration.

Prerequisites

  • Kubernetes cluster (1.19+)
  • Helm 3.x installed
  • kubectl configured
  • 8GB+ available memory in cluster
  • StorageClass for persistent volumes

Quick Start

1

Add Bytebot Helm Repository

helm repo add bytebot https://charts.bytebot.ai
helm repo update
2

Create Configuration

Create a values.yaml file with your settings:
# values.yaml
agent:
  # Set your API keys (one or more)
  env:
    ANTHROPIC_API_KEY: "sk-ant-your-key-here"
    OPENAI_API_KEY: "sk-your-key-here"
    GEMINI_API_KEY: "your-key-here"

# Resource limits
desktop:
  resources:
    requests:
      memory: "2Gi"
      cpu: "1"
    limits:
      memory: "4Gi"
      cpu: "2"

# Enable ingress for external access
ui:
  ingress:
    enabled: true
    hostname: bytebot.your-domain.com
    # tls: true  # Enable for HTTPS
3

Install Bytebot

helm install bytebot bytebot/bytebot \
  --namespace bytebot \
  --create-namespace \
  -f values.yaml
4

Check Deployment Status

# Watch pods come up
kubectl get pods -n bytebot -w

# Check service endpoints
kubectl get svc -n bytebot
5

Access Bytebot

If using ingress:
# Your Bytebot UI will be available at:
https://bytebot.your-domain.com
Or use port-forward for local access:
kubectl port-forward -n bytebot svc/bytebot-ui 9992:9992
# Access at http://localhost:9992

Configuration Options

AI Provider Configuration

agent:
  env:
    # Add one or more API keys
    ANTHROPIC_API_KEY: "sk-ant-your-key-here"
    OPENAI_API_KEY: "sk-your-key-here"
    GEMINI_API_KEY: "your-key-here"
Bytebot automatically detects available providers based on which API keys are set. Models are pre-configured within Bytebot.

Resource Configuration

# Desktop container resources
desktop:
  resources:
    requests:
      memory: "2Gi"
      cpu: "1"
    limits:
      memory: "4Gi"
      cpu: "2"
  
  # Persistent storage for desktop
  persistence:
    enabled: true
    size: "10Gi"
    storageClass: "standard"  # Your storage class

# Agent resources
agent:
  resources:
    requests:
      memory: "1Gi"
      cpu: "500m"
    limits:
      memory: "2Gi"
      cpu: "1"
  
  replicaCount: 1  # Always 1 - agent manages a single desktop

# UI resources
ui:
  resources:
    requests:
      memory: "256Mi"
      cpu: "100m"
    limits:
      memory: "512Mi"
      cpu: "500m"

# PostgreSQL resources
postgresql:
  resources:
    requests:
      memory: "256Mi"
      cpu: "250m"
    limits:
      memory: "1Gi"
      cpu: "1"
  persistence:
    enabled: true
    size: "8Gi"

Networking & Security

# Ingress configuration
ui:
  ingress:
    enabled: true
    className: "nginx"  # Your ingress class
    hostname: bytebot.example.com
    tls: true
    annotations:
      cert-manager.io/cluster-issuer: "letsencrypt-prod"
      nginx.ingress.kubernetes.io/proxy-body-size: "100m"

# Network policies
networkPolicy:
  enabled: true
  allowExternal: true

# Pod security
podSecurityContext:
  runAsNonRoot: true
  runAsUser: 1000
  fsGroup: 1000

# Enable authentication
auth:
  enabled: true
  type: "basic"  # or "oauth"
  username: "admin"
  password: "changeme"  # Change this!

Production Configuration

# Single instance deployment
agent:
  replicaCount: 1  # Agent handles one desktop

desktop:
  # Single desktop instance
  replicaCount: 1

# PostgreSQL with backups
postgresql:
  persistence:
    enabled: true
    size: "20Gi"
  backup:
    enabled: true
    schedule: "0 2 * * *"  # Daily at 2 AM

Advanced Deployment Scenarios

GPU Support

Enable GPU for AI acceleration:
desktop:
  gpu:
    enabled: true
    type: "nvidia"  # or "amd"
  resources:
    limits:
      nvidia.com/gpu: 1

Custom Images

Use your own container images:
images:
  desktop:
    repository: "your-registry/bytebot-desktop"
    tag: "custom-1.0"
    pullPolicy: "Always"
  agent:
    repository: "your-registry/bytebot-agent"
    tag: "custom-1.0"
  ui:
    repository: "your-registry/bytebot-ui"
    tag: "custom-1.0"

imagePullSecrets:
  - name: "your-registry-secret"

Monitoring & Observability

Prometheus Metrics

metrics:
  enabled: true
  serviceMonitor:
    enabled: true
    namespace: "monitoring"
  
  # Grafana dashboards
  dashboards:
    enabled: true
    namespace: "monitoring"

Logging

logging:
  level: "info"  # debug, info, warn, error
  format: "json"
  
  # Send to external logging
  fluentd:
    enabled: true
    host: "fluentd.logging.svc.cluster.local"
    port: 24224

Backup & Restore

Automated Backups

backup:
  enabled: true
  schedule: "0 2 * * *"  # Daily at 2 AM
  retention: 7  # Keep 7 days
  destination:
    type: "s3"
    bucket: "bytebot-backups"
    region: "us-east-1"

Manual Backup

# Backup database
kubectl exec -n bytebot bytebot-postgresql-0 -- pg_dump -U postgres bytebot > backup.sql

# Backup desktop data
kubectl cp bytebot/bytebot-desktop-0:/home/user ./desktop-backup

Troubleshooting

Common Issues

Debug Commands

# Get all resources
kubectl get all -n bytebot

# Describe problematic pod
kubectl describe pod -n bytebot <pod-name>

# Check events
kubectl get events -n bytebot --sort-by='.lastTimestamp'

# View logs
kubectl logs -n bytebot -l app=bytebot --tail=100

# Check persistent volumes
kubectl get pv,pvc -n bytebot

Upgrading

# Update repo
helm repo update

# Check changes
helm diff upgrade bytebot bytebot/bytebot -n bytebot -f values.yaml

# Perform upgrade
helm upgrade bytebot bytebot/bytebot -n bytebot -f values.yaml

# Rollback if needed
helm rollback bytebot -n bytebot

Uninstall

# Remove Bytebot
helm uninstall bytebot -n bytebot

# Clean up namespace
kubectl delete namespace bytebot

# Remove PVCs (careful - this deletes data!)
kubectl delete pvc -n bytebot --all

Next Steps

Need help? Join our Discord community for Kubernetes-specific support.