In this tutorial, you’ll learn how to deploy an OSS Server and Worker with Helm.

Prerequisites

  • A Kubernetes cluster
  • Install the Helm CLI

Get started

Configuring ingress or publicly exposing Prefect from the cluster is business dependent and not covered in this tutorial. For details on Ingress configuration, consult the Kubernetes documentation.

Set up your environment

Create a new namespace for this tutorial (all commands will use this namespace):

kubectl create namespace prefect
kubectl config set-context --current --namespace=prefect

Deploy Prefect Server with Helm

Add the Prefect Helm repository:

helm repo add prefect https://prefecthq.github.io/prefect-helm

Expected output:

NAME: prefect-server
LAST DEPLOYED: Tue Mar  4 09:08:07 2025
NAMESPACE: prefect
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Run the following command to port-forward the UI to your localhost:
$ kubectl --namespace prefect-server port-forward svc/prefect-server 4200:4200

Visit http://localhost:4200 to use Prefect!

Access the Prefect UI:

kubectl --namespace prefect-server port-forward svc/prefect-server 4200:4200

Open localhost:4200 in your browser and sign in with admin:password123.

Deploy a Prefect Worker

To connect a worker to your Prefect server in the same cluster:

Expected output:

Release "prefect-worker" has been upgraded. Happy Helming!
NAME: prefect-worker
LAST DEPLOYED: Tue Mar  4 11:26:21 2025
NAMESPACE: prefect
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:

Cleanup

To uninstall the Prefect Server and Worker:

helm uninstall prefect-worker
helm uninstall prefect-server

Troubleshooting