@scramjet/adapter-kubernetes
v2.1.0
Published
This package is part of Scramjet Transform Hub. This module holds the docker adapters utilized by Scramjet Transform Hub
Readme
@scramjet/adapter-kubernetes
Kubernetes adapter for Transform Hub. Stores Sequences and runs Sequence instances as Kubernetes pods, with containerized runners for Node.js, Python, and Bun.
When to use
Use the Kubernetes adapter when deploying Transform Hub on Kubernetes clusters. The adapter integrates with Kubernetes for sequence storage, runner pod lifecycle management, and networking. It is suitable for production deployments that require Kubernetes-native orchestration, scaling, and resource management.
The adapter is selected via the --runtime-adapter kubernetes flag or STH configuration. It provides:
- KubernetesSequenceAdapter — manages sequence storage via Kubernetes volumes
- KubernetesInstanceAdapter — manages instance lifecycle as Kubernetes pods
- Configurable pod resources, namespaces, pull policies, and runner images
- Kubernetes service account integration for RBAC
Quick start
# Start STH with Kubernetes adapter
scramjet-transform-hub \
--runtime-adapter kubernetes \
--k8s-sth-pod-host <hub-hostname-or-ip>The --k8s-sth-pod-host value is required so runner pods can connect back to the Hub.
Configuration
Key STH options when using the Kubernetes adapter:
--k8s-namespace <ns>— Kubernetes namespace for runner pods--k8s-runner-image <image>— runner image for Node.js pods--k8s-runner-py-image <image>— runner image for Python pods--k8s-runner-bun-image <image>— runner image for Bun pods--k8s-sth-pod-host <host|:auto>— host for runners to connect back to STH--k8s-auth-config-path <path>— kubeconfig path (defaults to in-cluster config)--k8s-default-pull-policy <policy>— image pull policy (IfNotPresent, Always, Never)--k8s-runner-resources-requests-cpu,--k8s-runner-resources-requests-memory— pod resource requests--k8s-runner-resources-limits-cpu,--k8s-runner-resources-limits-memory— pod resource limits
Stability
This package is stable.
See also
- Kubernetes adapter deployment for detailed setup.
- Process adapter for direct process execution.
- Docker adapter for Docker-based deployment.
- Transform Hub configuration for adapter configuration options.
Install
npm install @scramjet/adapter-kubernetesImport
import { /* ... */ } from "@scramjet/adapter-kubernetes";Documentation
See the package docs for full documentation.
