Skip to main content
Deploy CVAT on Kubernetes for production environments requiring high availability, horizontal scaling, and enterprise-grade reliability.

Prerequisites

Kubernetes Cluster

  • Kubernetes 1.23.0 or higher
  • kubectl configured and connected to your cluster
  • Cluster with at least:
    • 3 nodes (for high availability)
    • 8 CPU cores total
    • 16GB RAM total
    • 200GB storage

Required Tools

Storage Provider

Kubernetes cluster must have a default StorageClass or configure one:
You need:
  • ReadWriteMany (RWX): For shared backend storage
  • ReadWriteOnce (RWO): For databases (PostgreSQL, ClickHouse, Kvrocks)

Ingress Controller (Optional)

For external access, install an ingress controller:
Or enable the embedded Traefik ingress.

Installation

1. Add Helm Repository

Add the CVAT Helm chart repository:

2. Create Namespace

3. Basic Installation

Install CVAT with default configuration:
This creates:
  • CVAT backend deployment (server + workers)
  • CVAT frontend deployment
  • PostgreSQL StatefulSet
  • Redis StatefulSet
  • Kvrocks StatefulSet
  • ClickHouse StatefulSet
  • Open Policy Agent deployment
  • Vector for log collection
  • Grafana for analytics
  • Required services and PVCs

4. Wait for Pods to Start

Initialization takes 2-5 minutes.

5. Create Superuser

After all pods are running:

6. Access CVAT

Port Forward (Testing):
Then access: http://localhost:8000 Or configure Ingress for production (see below).

Configuration

Custom Values File

Create cvat-values.yaml to customize your deployment:
Install with custom values:

Ingress Configuration

Using Nginx Ingress

Using Embedded Traefik

External Database

Use an external PostgreSQL database:
Create secret:

External Redis

Scaling Workers

Adjust worker replicas based on load:

High Availability

For production HA setup:

Chart Structure

The CVAT Helm chart (v2.58.1) includes:

Dependencies

Automatically installed:
  • postgresql (v12.1.x): Primary database
  • redis (v19.6.4): Caching layer
  • clickhouse (v4.1.x): Analytics database
  • vector (v0.19.x): Log aggregation
  • grafana (v6.60.x): Analytics UI
  • traefik (v37.3.x): Optional ingress
  • nuclio (v0.21.x): Optional serverless functions

Templates

Key Kubernetes resources created:
  • Deployments: cvat-backend-server, cvat-frontend, cvat-opa
  • StatefulSets: PostgreSQL, Redis, Kvrocks, ClickHouse
  • Deployments (Workers): Export, Import, Annotation, Webhooks, Quality Reports, Chunks, Consensus, Utils
  • Services: Frontend, Backend, OPA, Databases
  • PersistentVolumeClaims: Backend storage, Kvrocks cache, database storage
  • ConfigMaps: Application config, Vector config, Grafana dashboards
  • Secrets: Database credentials, Redis passwords, ClickHouse auth
  • Jobs: Backend initializer (runs migrations)
  • Ingress: Optional external access

Operations

Upgrade CVAT

Rollback

Uninstall

Note: PVCs may need manual deletion.

Backup and Restore

Backup PostgreSQL:
Backup PVCs using your storage provider’s snapshot feature or:
Restore:

View Logs

Exec into Pods

Monitoring

Pod Status:
Service Status:
Events:
Resource Usage:

Troubleshooting

Pods Not Starting

Check pod status:
Common issues:
  • ImagePullBackOff: Check image name and registry access
  • CrashLoopBackOff: Check logs for application errors
  • Pending: Check storage class and resource availability

Database Connection Issues

Storage Issues

Worker Not Processing Jobs

Ingress Not Working

Advanced Configuration

Custom Storage Classes

Node Affinity and Tolerations

Additional Environment Variables

Custom Volumes

Production Best Practices

  1. Use specific image tags: Don’t use dev or latest in production
  2. Enable resource limits: Prevent resource exhaustion
  3. Configure HPA: Auto-scale based on CPU/memory
  4. Use external databases: For better reliability and backups
  5. Enable monitoring: Use Prometheus/Grafana for metrics
  6. Regular backups: Automate database and volume backups
  7. TLS everywhere: Use cert-manager for automatic certificates
  8. Network policies: Restrict pod-to-pod communication
  9. Secrets management: Use external secret managers (Vault, AWS Secrets Manager)
  10. Multi-zone deployment: Spread pods across availability zones

Performance Tuning

Next Steps