Skip to main content

Deploy the Langflow development environment on Kubernetes

The Langflow Integrated Development Environment (IDE) Helm chart is designed to provide a complete environment for developers to create, test, and debug their flows. It includes both the API and the UI.

Prerequisites

Prepare a Kubernetes cluster

This example uses Minikube, but you can use any Kubernetes cluster.

  1. Create a Kubernetes cluster on Minikube.


    _10
    minikube start

  2. Set kubectl to use Minikube.


    _10
    kubectl config use-context minikube

Install the Langflow IDE Helm chart

  1. Add the repository to Helm and update it.


    _10
    helm repo add langflow https://langflow-ai.github.io/langflow-helm-charts
    _10
    helm repo update

  2. Install Langflow with the default options in the langflow namespace.


    _10
    helm install langflow-ide langflow/langflow-ide -n langflow --create-namespace

  3. Check the status of the pods.


    _10
    kubectl get pods -n langflow

Access the Langflow IDE

Enable local port forwarding to access Langflow from your local machine.

  1. To make the Langflow API accessible from your local machine at port 7860:

_10
kubectl port-forward -n langflow svc/langflow-service-backend 7860:7860

  1. To make the Langflow UI accessible from your local machine at port 8080:

_10
kubectl port-forward -n langflow svc/langflow-service 8080:8080

Now you can do the following:

  • Access the Langflow API at http://localhost:7860.
  • Access the Langflow UI at http://localhost:8080.

Configure the Langflow version

Langflow is deployed with the latest version by default.

To specify a different Langflow version, set the langflow.backend.image.tag and langflow.frontend.image.tag values in the values.yaml file.


_10
langflow:
_10
backend:
_10
image:
_10
tag: "1.0.0a59"
_10
frontend:
_10
image:
_10
tag: "1.0.0a59"

Configure external storage

By default, the chart deploys a SQLite database stored in a local persistent disk. If you want to use an external PostgreSQL database, you can configure it in two ways:

  • Use the built-in PostgreSQL chart:

_10
postgresql:
_10
enabled: true
_10
auth:
_10
username: "langflow"
_10
password: "langflow-postgres"
_10
database: "langflow-db"

  • Use an external database:

_22
postgresql:
_22
enabled: false
_22
_22
langflow:
_22
backend:
_22
externalDatabase:
_22
enabled: true
_22
driver:
_22
value: "postgresql"
_22
port:
_22
value: "5432"
_22
user:
_22
value: "langflow"
_22
password:
_22
valueFrom:
_22
secretKeyRef:
_22
key: "password"
_22
name: "your-secret-name"
_22
database:
_22
value: "langflow-db"
_22
sqlite:
_22
enabled: false

Configure scaling

Scale the number of replicas and resources for both frontend and backend services:


_21
langflow:
_21
backend:
_21
replicaCount: 1
_21
resources:
_21
requests:
_21
cpu: 0.5
_21
memory: 1Gi
_21
# limits:
_21
# cpu: 0.5
_21
# memory: 1Gi
_21
_21
frontend:
_21
enabled: true
_21
replicaCount: 1
_21
resources:
_21
requests:
_21
cpu: 0.3
_21
memory: 512Mi
_21
# limits:
_21
# cpu: 0.3
_21
# memory: 512Mi

note

If your flow relies on a shared state, such as built-in chat memory, you need to set up a shared database when scaling horizontally.

For more examples of langflow-ide deployment, see the Langflow Helm Charts repository.

Search