Deploy
Deploying to Kubernetes
Run your backend on any Kubernetes cluster with a simple container image and deployment manifest.
Guide
Prerequisites
- A Kubernetes cluster with
kubectlaccess (AKS, EKS, GKE, k3s, etc.) - Container registry credentials (Docker Hub, GHCR, GCR, etc.)
- Your backend application repository
Generate Environment Variables
Navigate to Rivet and click Connect > Manual. Copy the environment variables provided, they will be used in later manifests. They should look something like this:
Command Line
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.
Deploy to Kubernetes
Create a backend-secrets.yaml for your environment variables:
YAML
Then create a deployment.yaml:
YAML
You do not need to expose a container port. Rivet tunnels traffic directly to your backend.
Apply both manifests:
Command Line
Add a Service or Ingress if you need external access.
Verify the Runner
Check that the pod is running:
Command Line
Your runner should appear as connected on the Rivet dashboard once the pod is ready.