Skip to main content
This tutorial will guide you through deploying a single-node Restate cluster on a local Kubernetes cluster using Helm. We will use kind to create a local Kubernetes cluster for testing purposes.
1

Prerequisites

Install the following on your local machine:This guide was written with kind v0.30.0, and Restate v1.5.0. Contact us on Discord or Slack if something does not work as expected.
2

Create a kind cluster

kind create cluster
Set kubectl context to kind-kind:
kubectl cluster-info --context kind-kind
3

Install the single-node Restate Helm chart

helm install restate oci://ghcr.io/restatedev/restate-helm \
  --namespace restate
  --create-namespace
This will deploy a single-node Restate cluster in the restate namespace.Wait until the restate-0 pod is in the Ready state:
kubectl get pods -n restate -w
4

Forward the ports of the Restate ingress and the UI to your local machine

kubectl port-forward svc/restate -n restate 8080:8080 9070:9070
Now you can access the Restate UI at http://localhost:9070.
5

Build and upload a Restate service Docker image to the kind cluster

For example, download the TypeScript Hello World service:
restate example typescript-hello-world &&
cd typescript-hello-world &&
npm install
Build a Docker image for the service:
docker build -t my-restate-service:0.0.1 .
Upload the image to the kind cluster:
kind load docker-image my-restate-service:0.0.1
6

Deploy the Restate service

Create a RestateDeployment manifest for the service in a file called service-deployment.yaml:
service-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
      - name: app
        image: my-restate-service:0.0.1
        ports:
        - name: http
          containerPort: 9080
---
apiVersion: v1
kind: Service
metadata:
  name: my-app
spec:
  selector:
    app: my-app
  ports:
  - name: http
    port: 9080
    targetPort: 9080
Apply the manifest to deploy the service:
kubectl apply -f service-deployment.yaml -n restate
7

Register the service

In the Restate UI, you can now register the deployment http://my-app.restate.svc.cluster.local:9080/ via the UI at http://localhost:9070.Once it is registered, you should see the deployed service listed in the Restate UI:
8

Invoke the service

In the Restate UI playground, you can now invoke the service. In the overview page, click on the greet handler of your service to open the playground. Then send a request:
9

🎉 You did it!

You have successfully deployed a Restate cluster and a Restate service on a local kind Kubernetes cluster using the Helm chart!Check out the Restate Helm deployment docs for more information.
After you are done experimenting, you can delete the kind cluster:
kind delete cluster