GCP
Learn how to deploy Flowise on GCP
Last updated
Learn how to deploy Flowise on GCP
Last updated
Notedown your Google Cloud [ProjectId]
Install Git
Install the Google Cloud CLI
Install Docker Desktop
Create a Kubernetes Cluster if you don't have one.
Name the Cluster, choose the right resource location, use Autopilot
mode and keep all other default configs.
Once the Cluster is created, Click the 'Connect' menu from the actions menu
Copy the command and paste into your terminal and hit enter to connect your cluster.
Run the below command and select correct context name, which looks like gke_[ProjectId]_[DataCenter]_[ClusterName]
Set the current context
Run the following commands to build and push the Docker image to GCP Container Registry.
Clone the Flowise
Build the Flowise
Update the Dockerfile
file a little.
Specify the platform of nodejs
Add python3, make and g++ to install
Build as Docker image, make sure the Docker desktop app is running
Push the Docker image to GCP container registry.
Create a yamls
root folder in the project.
Add the deployment.yaml
file into that folder.
Add the service.yaml
file into that folder.
It will be look like below.
Deploy the yaml files by running following commands.
Go to Workloads
in the GCP, you can see your pod is running.
Go to Services & Ingress
, you can click the Endpoint
where the Flowise is hosted.
You have successfully hosted the Flowise apps on GCP 🥳
By default, there is a 30 seconds timeout assigned to the proxy by GCP. This caused issue when the response is taking longer than 30 seconds threshold to return. In order to fix this issue, make the following changes to YAML files:
Note: To set the timeout to be 10 minutes (for example) -- we specify 600 seconds below.
Create a backendconfig.yaml
file with the following content:
Issue: kubectl apply -f backendconfig.yaml
Update your service.yaml
file with the following reference to the BackendConfig
:
Issue: kubectl apply -f service.yaml