Kubernetes
Ricochet supports amd64, arm64, and mixed-architecture Kubernetes clusters.
The Helm chart installs one ricochet-server replica, the service account and RBAC used to launch workloads, and optional persistent storage and ingress resources.
Prerequisites
Section titled “Prerequisites”Before installing Ricochet, provide:
- Kubernetes 1.27 or newer
- Helm 3.8 or newer with OCI registry support
- An OIDC client for the public Ricochet URL
- A default
ReadWriteOncestorage class for the server home volume - A
ReadWriteManystorage class for shared content and dependency caches - An ingress controller and TLS certificate issuer when exposing Ricochet through the chart
Install
Section titled “Install”-
Create a namespace:
Terminal window kubectl create namespace ricochet -
Store the OIDC credentials in a Secret:
Terminal window kubectl --namespace ricochet create secret generic ricochet-oidc \--from-literal=RICOCHET_AUTH__OIDC__CLIENT_ID='your-client-id' \--from-literal=RICOCHET_AUTH__OIDC__CLIENT_SECRET='your-client-secret' -
Save the following configuration as
values.yaml:values.yaml replicaCount: 1envFrom:- secretRef:name: ricochet-oidcconfig:"auth.oidc":issuer_url: "https://your-idp.example.com/"redirect_url: "https://ricochet.example.com/oauth/callback"persistence:home:enabled: truesize: 25Giapps:deployment:persistence:content:enabled: truestorageClass: "rwx-storage"accessMode: ReadWriteManysize: 20Gicache:enabled: truestorageClass: "rwx-storage"accessMode: ReadWriteManysize: 20Giingress:enabled: trueclassName: nginxannotations:cert-manager.io/cluster-issuer: letsencrypt-prodhosts:- host: ricochet.example.compaths:- path: /pathType: Prefixtls:- secretName: ricochet-tlshosts:- ricochet.example.comresources:requests:cpu: 250mmemory: 512Milimits:memory: 2GiReplace the example hostnames, ingress class, certificate issuer, and
rwx-storagestorage class with values for your cluster. If TLS terminates outside Kubernetes, disableingressand expose the chart’sClusterIPservice through your existing gateway. -
Install the latest chart:
Terminal window helm install ricochet oci://ghcr.io/ricochet-rs/ricochet-helm \--namespace ricochet \--values values.yamlThe chart version is independent from the
ricochet-serverversion. Check the chart’sappVersionbefore upgrading:Terminal window helm show chart oci://ghcr.io/ricochet-rs/ricochet-helm -
Wait for Ricochet to become ready:
Terminal window kubectl --namespace ricochet rollout status deployment/ricochetkubectl --namespace ricochet get pods,pvc,ingress
Persistence
Section titled “Persistence”The example creates three volumes:
| Volume | Default mount path | Access mode | Purpose |
|---|---|---|---|
| Home | /var/lib/ricochet/data | ReadWriteOnce | Database, encryption keys, configuration, logs, and server state |
| Content | /var/lib/ricochet/data/content | ReadWriteMany | Deployment bundles shared with app and task workloads |
| Cache | /var/lib/ricochet/data/.cache | ReadWriteMany | R, Python, and Julia dependency caches shared across workloads |
Back up the home and content volumes together. The cache volume can be recreated, but doing so makes subsequent deployments restore their dependencies again.
The chart disables persistence by default.
Running the one-line helm install command without values creates an ephemeral installation and is not recommended outside testing.
Multi-architecture clusters
Section titled “Multi-architecture clusters”Ricochet can restore dependencies for both amd64 and arm64 nodes. Allow the server to discover node architectures by adding this value:
rbac: clusterRole: enabled: trueThis creates cluster-scoped permission to list nodes. Leave it disabled on single-architecture clusters when you do not want to grant that permission.
Architecture
Section titled “Architecture”The ricochet-server creates Kubernetes resources for deployed content:
- Each app runs as a Kubernetes Deployment.
- Each task invocation runs as a Kubernetes Job.
- Dependency restoration runs in a separate Job before the deployment becomes active.
When an app starts, an init container verifies that its dependencies are available for the node architecture. If necessary, the init container restores dependencies before starting the app.
App scaling
Section titled “App scaling”Ricochet scales app deployments using the settings in each content item’s _ricochet.toml:
min_instancessets the minimum replicas.max_instancessets the maximum replicas.spawn_thresholdsets the connection occupancy percentage that triggers scale-up.max_connectionssets the connection capacity of each replica.max_connection_agesets the maximum connection lifetime.inactive_timeoutsets how long an idle replica remains active.
Custom deployment configuration
Section titled “Custom deployment configuration”Administrators can allow content owners to extend the Kubernetes deployment specification for an individual app. This capability is disabled by default because arbitrary pod configuration can weaken cluster security.
Enable it only when content owners are trusted:
config: launcher: allow_custom_k8s_config: trueDo not override imagePullPolicy, imagePullSecrets, or strategy in per-app configuration because the chart supplies those fields instance-wide.
Upgrade
Section titled “Upgrade”Review the new chart’s values and appVersion, then reuse the installation values:
helm upgrade ricochet oci://ghcr.io/ricochet-rs/ricochet-helm \ --namespace ricochet \ --values values.yamlBack up persistent data before upgrading.