docs/versioned_docs/version-1.9.0/Deployment/deployment-kubernetes-dev.mdx
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
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 Langflow API and visual editor.
This example uses Minikube, but you can use any Kubernetes cluster.
Create a Kubernetes cluster on Minikube:
minikube start
Set kubectl to use Minikube:
kubectl config use-context minikube
Add the repository to Helm, and then update it:
helm repo add langflow https://langflow-ai.github.io/langflow-helm-charts
helm repo update
Install Langflow with the default options in the langflow namespace:
helm install langflow-ide langflow/langflow-ide -n langflow --create-namespace
Check the status of the pods:
kubectl get pods -n langflow
Enable local port forwarding to access Langflow from your local machine:
Make the Langflow API accessible from your local machine at port 7860:
kubectl port-forward -n langflow svc/langflow-service-backend 7860:7860
Make the visual editor accessible from your local machine at port 8080:
kubectl port-forward -n langflow svc/langflow-service 8080:8080
Now you can do the following:
http://localhost:7860.http://localhost:8080.You can modify the Langflow IDE Helm chart's values.yaml file to customize your deployment.
The following sections describe some common modifications.
If you need to set secrets, Kubernetes secrets are recommended.
The Langflow IDE Helm chart deploys the latest Langflow version by default.
To specify a different Langflow version, set the langflow.backend.image.tag and langflow.frontend.image.tag values to your preferred version.
For example:
langflow:
backend:
image:
tag: "1.0.0a59"
frontend:
image:
tag: "1.0.0a59"
The Langflow IDE Helm chart uses the default Langflow database configuration, specifically a SQLite database stored in a local persistent disk.
If you want to use an external PostgreSQL database, use postgresql chart or externalDatabase to configure the database connection in values.yaml.
Use the built-in PostgreSQL chart:
postgresql:
enabled: true
auth:
username: "langflow"
password: "langflow-postgres"
database: "langflow-db"
If you don't want to use the built-in PostgreSQL chart, set postgresql.enabled to false, and then configure the database connection in langflow.backend.externalDatabase:
postgresql:
enabled: false
langflow:
backend:
externalDatabase:
enabled: true
driver:
value: "postgresql"
host:
value: "postgresql-svc.langflow.svc.cluster.local"
port:
value: "5432"
user:
value: "langflow"
password:
valueFrom:
secretKeyRef:
key: "password"
name: "your-secret-name"
database:
value: "langflow-db"
sqlite:
enabled: false
To configure scaling for the Langflow IDE Helm chart deployment, you must set replicaCount (horizontal scaling) and resources (vertical scaling) for both the langflow.backend and langflow.frontend.
If your flows rely on a shared state, such as built-in chat memory, you must also set up a shared database when scaling horizontally.
langflow:
backend:
replicaCount: 1
resources:
requests:
cpu: 0.5
memory: 1Gi
# limits:
# cpu: 0.5
# memory: 1Gi
frontend:
enabled: true
replicaCount: 1
resources:
requests:
cpu: 0.3
memory: 512Mi
# limits:
# cpu: 0.3
# memory: 512Mi