Platforms
Deploying to Kubernetes
Deploy your RivetKit app to any Kubernetes cluster.
Steps
Prerequisites
- A Kubernetes cluster with
kubectlaccess (EKS, GKE, k3s, etc.) - Container registry credentials (Docker Hub, GHCR, GCR, etc.)
- Your RivetKit app
- If you don’t have one, see the Quickstart page or our Examples
- Access to the Rivet Cloud or a self-hosted Rivet Engine
Package Your App
Create a Dockerfile in your project root:
Dockerfile
Build and Push the Image
Command Line
Replace registry.example.com/your-team with your registry path. Auth with docker login first if needed.
Set Environment Variables
After creating your project on the Rivet dashboard, select Kubernetes as your provider. You’ll be provided RIVET_ENDPOINT and RIVET_PUBLIC_ENDPOINT environment variables.
Create a rivetkit-secrets.yaml for your environment variables:
YAML
Deploy to Kubernetes
Create a deployment.yaml:
YAML
Apply both manifests:
Command Line
Connect to Rivet
- Add a
Serviceand Ingress to expose your app externally (e.g.my-app.example.com) - On the Rivet dashboard, paste your domain with the
/api/rivetpath into the connect form (e.g.https://my-app.example.com/api/rivet) - Click “Done”
Verify
Check that the pod is running:
Command Line
Your app should appear as connected on the Rivet dashboard once the pod is ready.