---
title: "Example Code to deploy LocalAI, Flowise, and Pulumi on AWS EKS"
description: "A TypeScript program to deploy a Kubernetes cluster on AWS"
url: "https://www.pulumi.com/dev/examples/aws-ts-localai-flowise/"
image: "https://www.pulumi.com/assets/og/dev/examples/aws-ts-localai-flowise.png"
---

# Example Code to deploy LocalAI, Flowise, and Pulumi on AWS EKS

A TypeScript program to deploy a Kubernetes cluster on AWS

- Source on GitHub: https://github.com/pulumi/examples/tree/master/aws-ts-localai-flowise

## Get started with this example

This example lives in the [pulumi/examples](https://github.com/pulumi/examples/tree/master/aws-ts-localai-flowise) repo. Pull down just this directory to follow along:

```bash
git clone --filter=blob:none --sparse https://github.com/pulumi/examples pulumi-examples
git -C pulumi-examples sparse-checkout set aws-ts-localai-flowise
cd pulumi-examples/aws-ts-localai-flowise
```

## Prerequisites

- [Pulumi CLI](https://www.pulumi.com/docs/install/)
- [Node.js](https://nodejs.org/en/download/)
- [AWS Account](https://aws.amazon.com)

## How to deploy?

> If you run Pulumi for the first time, you will be asked to log in. Follow the instructions on the screen to
> login. You may need to create an account first, don't worry it is free.

### Step 1 - Clone the repository

```shell
git clone https://github.com/pulumi/examples.git
cd examples/aws-ts-localai-flowise
```

### Step 2 - Install the dependencies

```shell
pulumi install
```

### Step 3 - Login to AWS

```shell
aws configure
```

### Step 4 - Deploy the infrastructure

```shell
pulumi up
```

### Step 5 - Port forward the Flowise UI

To retrieve the kubeconfig file, you can use the following command:

```shell
pulumi stack output kubeconfig --show-secrets > kubeconfig.yaml
```

As the program does not deploy a LoadBalancer, you need to port forward the UI to your local machine:

```shell
kubectl port-forward svc/flowise-ui 3000:3000
```
