A lightweight open-source framework for writing and deploying distributed data transformations on Kubernetes.
Project description
kube-transform
kube-transform is a lightweight open-source framework for writing and deploying distributed, batch-oriented data pipelines on Kubernetes.
It is intentionally thin — only ~1,000 lines of code — and designed to be an easy-to-understand layer between your code and Kubernetes. Unlike heavyweight orchestration platforms like Apache Airflow (which has hundreds of thousands of lines), kube-transform aims to be simple to reason about, debug, and extend.
It focuses on simplicity and flexibility:
- Minimal required configuration
- No persistent control plane components
- Vendor-agnostic: compatible with any Kubernetes cluster, image, and file store that meet a few basic requirements
If you're looking for a quick way to get started, check out kube-transform-starter-kit for reusable setup resources like Dockerfiles, Terraform, and RBAC templates. But using the starter kit is entirely optional.
Requirements
Your setup must meet these basic requirements:
1. Deployment Inputs
To run a pipeline, you must provide:
pipeline_spec: A Python dictionary that conforms to theKTPipelineschema. You can optionally write your spec using theKTPipelinePydantic model directly, and then call.model_dump()to convert it to a dict.image_path: A string path to your Docker imagedata_dir: A string path to your file store (must be valid from the perspective of pods running in the cluster)
2. Docker Image
- Must include Python 3.11+
- Must have
kube-transforminstalled (e.g. via pip) - Must include your code in
/app/kt_functions/, which should be an importable module containing the functions referenced in your pipeline
3. File Store ("DATA_DIR")
- This is the directory that all pipeline jobs and the controller will read from and write to. It will be passed as the
data_dirargument torun_pipeline(). - Can be a local folder (e.g.
/mnt/data) or a cloud object store (e.g.s3://some-bucket/) - Must be readable and writable by all pods in your cluster
- Compatible with anything
fsspecsupports
The KT controller internally uses
fsspec.open()to write pipeline metadata toDATA_DIR. You must ensure thatDATA_DIRis transparently accessible to all pods (including the controller). This typically means one of the following:
- You're using a mounted volume that is accessible at
/mnt/data- You've configured access via IRSA (for S3) or Workload Identity (for GCS), so the
kt-podservice account has permissions to access your object store
In a single-node cluster, simply mounting a local folder to
/mnt/datawill work. All KT pods will have access to/mnt/data.
4. Kubernetes Cluster
- Must be able to pull your Docker image (e.g. via ECR, DockerHub, etc.)
- Must be able to access your file store
- Must include a service account named
kt-podin the default namespace, with permission to create Kubernetes Jobs - Your deployment machine must be able to connect to the cluster (e.g. via
kubectl)
For a working example setup with autoscaling, IAM roles, and RBAC configuration, see
kube-transform-starter-kit.
How to Run
Once your inputs are ready:
from kube_transform import run_pipeline
run_pipeline(pipeline_spec, image_path, data_dir)
This will:
- Launch a temporary
kt-controllerJob in your Kubernetes cluster - Submit all pipeline jobs in the correct dependency order
- Shut down automatically when the pipeline completes (or fails)
You can view progress using:
kubectl get pods
Make sure you have the same version of kube-transform running locally (for the run_pipeline function) as you have in your image.
Autoscaling & Resource Management
kube-transform is compatible with both fixed-size and autoscaling clusters:
- If your cluster supports autoscaling, KT will take advantage of it automatically.
- If your cluster is fixed-size, jobs will remain in
Pendingstate until resources are available.
For help setting up either configuration, see
kube-transform-starter-kit.
Questions? Feature requests? Open an issue on GitHub.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kube_transform-0.2.1.tar.gz.
File metadata
- Download URL: kube_transform-0.2.1.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b2a5c138f9a83bddf0746fd36ab7205411d0fdf350c8651cf76e3dadc68ecca
|
|
| MD5 |
fc7bd5018af2b4b699c81e813f37b651
|
|
| BLAKE2b-256 |
e67f9c9dbfa1e26855e2c97047b6bda034d5dc813eb71789564451e5a96fe8a1
|
File details
Details for the file kube_transform-0.2.1-py3-none-any.whl.
File metadata
- Download URL: kube_transform-0.2.1-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89d7b577f70761841aa43a47a1fcee2fb44ccda19c465ed95e9d7d8452b9450b
|
|
| MD5 |
ee6136627febf8ac7905bba7a9ea774d
|
|
| BLAKE2b-256 |
2abeb976aa75862227c6254f10bafa81eb77d3ac8040a1502abbf1d320a6a290
|