Skip to main content
Deploy Open WebUI on Kubernetes using kubectl, Kustomize, or Helm charts for production-ready, scalable deployments.

Prerequisites

  • Kubernetes cluster (1.19+)
  • kubectl configured to communicate with your cluster
  • Persistent volume provisioner (for data persistence)
  • Optional: Helm 3.x for Helm-based deployment

Quick Start with Kubectl

Basic Deployment

Create a deployment manifest open-webui-deployment.yaml:
open-webui-deployment.yaml
Deploy:

Expose with Ingress

Create an Ingress resource:
ingress.yaml
Apply:

Deploying with Ollama

Combined Deployment

Deploy both Open WebUI and Ollama in the same namespace:
ollama-deployment.yaml
Apply:

GPU Support

For GPU support, add node selectors and resource limits:

Horizontal Scaling

For multi-replica deployments, configure Redis for session management:
1

Deploy Redis

redis-deployment.yaml
2

Configure Open WebUI for Redis

Update the Open WebUI deployment with Redis configuration:
3

Scale Replicas

Database Configuration

PostgreSQL Backend

For production deployments, use PostgreSQL instead of SQLite:
postgres-deployment.yaml
Update Open WebUI deployment:

ConfigMap for Environment Variables

Manage environment variables with ConfigMaps:
configmap.yaml
Reference in deployment:

Monitoring and Observability

Prometheus Metrics

Enable OpenTelemetry metrics:

Using Helm (Community Charts)

While there isn’t an official Helm chart, you can create your own or use community charts. Basic Helm values structure:
values.yaml

Security Best Practices

1

Use Secrets

Store sensitive data in Kubernetes Secrets, not ConfigMaps:
2

Network Policies

Restrict network access between pods:
networkpolicy.yaml
3

Pod Security Standards

Apply pod security standards:

Troubleshooting

Check Pod Status

View Logs

Check PVC Status

Shell into Container

Next Steps

Environment Variables

Configure Open WebUI settings

Updating

Update your Kubernetes deployment

Docker Deployment

Alternative Docker deployment

Reverse Proxy

Configure ingress and reverse proxy