All Products
Search
Document Center

Container Service for Kubernetes:Build a general-purpose web chatbot with Flowise

Last Updated:Jun 18, 2026

Deploy Flowise on ACK to build and embed LLM-powered chatbots with a visual drag-and-drop workflow.

Overview

2024-10-23_10-02-54 (1)

The solution embeds a blue floating chat button on the webpage. When users visit the website, they can click the button to interact with the chatbot.

Configure a general-purpose chatbot in three steps:

  1. Install the Flowise component: Create an ACK cluster using Alibaba Cloud Container Service for Kubernetes (ACK) and install the Flowise component.

  2. Build a general-purpose chatbot workflow: Create a chatbot in the Flowise service.

  3. Orchestrate a personalized conversation flow: Set up a Q&A model and a prompt template, then connect them with a chain model.

flowise

1. Install the Flowise component

Flowise is an open-source low-code framework for building large language model (LLM) applications. Its drag-and-drop UI simplifies LangChain-based workflow creation from prototyping to production.

1.1 Prerequisites

  1. An ACK Pro cluster of version 1.22 or later is created. See Create an ACK managed cluster and Upgrade a cluster.

  2. kubectl is connected to the cluster. See Obtain the kubeconfig file of a cluster and use kubectl to connect to the cluster.

1.2 Deploy the component

  1. Install and deploy the Flowise component.

    1. Log on to the ACK console. In the left navigation pane, click Clusters.

    2. Click the target cluster. Follow the numbered steps in the figure to install the Flowise component.

      Leave Application Name and Namespace empty. Click ⑤Next, then click Yes to use the defaults (flowise / flowise-system).

      image

    3. Set Chart Version to the latest version and click OK.

      On the Parameters tab, set a custom username and password.

  2. Verify that the Flowise component is running properly.

    Check that the pods in the flowise-system namespace are in the Running state:

    kubectl get pod -n flowise-system

    Expected output:

    NAME                       READY   STATUS    RESTARTS   AGE
    flowise-596fb8bf88-7zdlr   1/1     Running   0          3h
    flowise-postgresql-0       1/1     Running   0          3h

2. Create a workflow orchestration template

2.1 Access the Flowise service

  1. Enable Internet access for the Flowise component.

    In production, enable Access Control to secure your data.image

  2. After configuration, find the External IP of the Flowise component. Enter this IP in your browser to access the Flowise service.

    image

  3. Access the Flowise service.

    Open the External IP address and enter your Username and Password.

    image

    If no custom username or password was set during installation, use the defaults: Username=flowiseuser and Password=flowisepassword.

2.2 Create Chatflows

Flowise can turn flows into tools. A main flow coordinates task-specific tool flows, each designed for a specific task.

Each child flow runs independently with its own memory. A final agent summarizes all outputs for higher-quality results.

To create a Chatflow:

  1. Log on to the Flowise service.

  2. Click ChatFlows > Add New.

    image

3. Orchestrate a personalized conversation flow

3.1 Configure Chat Models

Flowise orchestrates LLM applications by connecting nodes. These nodes, abstracted from frameworks such as LangChain and LlamaIndex, include types such as Agents, Chains, and Chat Models.

  1. In the Chat Models Panel, drag a ChatOpenAI Custom node. Click Connect Credential > Create New and enter the API key for Tongyi Qianwen.

    image

  2. In Connect Credential, select Tongyi Qianwen. Set Model Name to qwen-turbo, and set Temperature to 0.9. On the Additional Parameters page, set BasePath to https://dashscope.aliyuncs.com/compatible-mode/v1.

    image

3.2 Set up a prompt template

In the Prompts panel, drag a Prompt Template node and configure the Template as follows.

Question: {question}
Answer: Let's think step by step.

image

3.3 Set up an LLM Chain

  1. In the Chains panel, drag an LLM Chain node.

    image

  2. Connect the nodes to complete the chatbot orchestration.

    image

3.4 Verify the result

After orchestrating the Chatflow, click Save in the upper-right corner. Use the Message button to debug the chatbot.

image

Summary

Apply to a production environment

Two ways to deploy the chatbot to production:

  1. Use the conversation flow as an API in your frontend application.

    Flowise provides BaaS-style APIs for all applications, enabling LLM access in frontend applications. See Develop with APIs.

  2. Embed the chatbot on your website.

    Copy the embed code into your HTML file.

    Use Flowise to create a chatbot and embed it into your website. See Embed in websites.

Example: Embed an AI application into a website

Follow these steps to embed an LLM application into your website.

This example is for demonstration only. Enable Access Control in production to secure your data.

  1. Enable Internet access for the Flowise component and open the external IP in your browser. See Access the Flowise service.

    image

  2. Build a simple web application in an ACK cluster to debug the chatbot.

    Deploy a web application in the ACK cluster to host the Flowise LLM application.

    1. Obtain the Flowise service code.

      Select an embed method and copy the code into your website.

      image

    2. In the ACK cluster, create a deployment and a service to run and expose the web application.

      The following YAML deploys an Nginx server with static HTML.

      1. Log on to the ACK console. On the Configurations > ConfigMaps page, select the default namespace and click Create From YAML. Paste the YAML below and replace window.difyChatbotConfig, scr, and id with your Flowise service code.

        See the example below.

        View YAML content

        apiVersion: apps/v1
        kind: Deployment
        metadata:
          name: web-deployment
        spec:
          replicas: 2
          selector:
            matchLabels:
              app: web
          template:
            metadata:
              labels:
                app: web
            spec:
              containers:
              - name: web
                image: registry.openanolis.cn/openanolis/nginx:1.14.1-8.6
                ports:
                - containerPort: 80
                volumeMounts:
                - name: web-content
                  mountPath: /usr/share/nginx/html
              volumes:
              - name: web-content
                configMap:
                  name: web-config
          
        
        ---
        apiVersion: v1
        kind: Service
        metadata:
          name: web-service
        spec:
          selector:
            app: web
          ports:
            - protocol: TCP
              port: 80
              targetPort: 80
          type: LoadBalancer
        
        
        ---
        apiVersion: v1
        kind: ConfigMap
        metadata:
          name: web-config
        data:
          index.html: |
            <!DOCTYPE html>
            <html lang="en">
            <head>
                <meta charset="UTF-8">
                <meta name="viewport" content="width=device-width, initial-scale=1.0">
                <title>The simplest website service</title>
              
            </head>
            <body>
                <h1>Welcome to my website!</h1>
            
            
                <script type="module">
            import Chatbot from "https://cdn.jsdelivr.net/npm/flowise-embed/dist/web.js"
            Chatbot.init({
                chatflowid: "86c03xxx-de3a-4xx3-9xx2-f5d56xxxx0a4",
                apiHost: "http://127.xx.xx.1:8080",
            })
                </script>
        
        
        
            </body>
            </html>
      2. Successful deployment:

        image

      3. Enable Internet access for the deployed service.

        In production, enable Access Control to secure your data.

        image

        After configuration, find the External IP of web-service. Enter this IP in your browser to access the web service.

        image

        Important
        • For external access, ensure the cluster's security group allows traffic on port 80. See Add a security group rule.

        • Ensure your code is secure against cross-site scripting (XSS) and code injection. This is a basic example; extend and modify as needed.

      4. View the result.

        2024-10-23_10-02-54 (1)

Continuous improvement

See Build a customized AI Q&A assistant for a website using Dify.

With Dify, integrate knowledge bases into LLM applications to build customized AI Q&A solutions for your business.

Billing

This feature charges management fees for ACK Pro clusters and fees for the Alibaba Cloud resources that are used. The Alibaba Cloud products involved in this feature include Elastic Compute Service (ECS), Server Load Balancer (SLB), elastic IP addresses (EIPs), and Apsara File Storage NAS. You are charged for the resources that you use based on the billing rules of each product. For more information about cluster management fees and resource fees, see Billing overview.