Skip to content

Krayne

CLI and SDK for creating, managing, and scaling Ray clusters on Kubernetes.

Krayne wraps the KubeRay operator behind a clean, opinionated interface so ML practitioners can get distributed compute without touching Kubernetes manifests.


Get started in seconds

pip install krayne
krayne create my-cluster --gpus-per-worker 1 --workers 2

That's it. One command gives you a fully configured Ray cluster with dashboard, notebook, and SSH access.


Interactive TUI

A fast and intuitive terminal UI is also available:

ikrayne

ikrayne demo

Navigate clusters, create with prefilled forms, scale, delete, and toggle tunnels — all with keyboard shortcuts.


Why Krayne?

Pain point How Krayne helps
Verbose KubeRay YAML manifests krayne create my-cluster — zero config needed
Kubernetes expertise required Sensible defaults handle resources, services, and networking
No automation path Python SDK exposes the same operations as functions
Scattered tooling One CLI for create, scale, describe, delete, and tunnels

CLI and Python SDK

krayne create my-experiment --gpus-per-worker 1 --workers 2
krayne describe my-experiment
krayne scale my-experiment --replicas 4
krayne delete my-experiment --force
from krayne.api import create_cluster, scale_cluster, delete_cluster
from krayne.config import ClusterConfig, WorkerGroupConfig

config = ClusterConfig(
    name="my-experiment",
    worker_groups=[WorkerGroupConfig(replicas=2, gpus=1, gpu_type="a100")],
)

info = create_cluster(config, wait=True)
print(f"Dashboard: {info.dashboard_url}")

scale_cluster("my-experiment", "default", "worker", replicas=4)
delete_cluster("my-experiment", "default")

Key features

  • Zero-config defaults — every command works with no flags
  • CLI and SDK — anything from the terminal works from code too
  • Interactive TUI — k9s-style keyboard-driven cluster management
  • GPU support — one flag to add GPUs with type selection
  • Local sandboxkrayne sandbox setup for development without a real cluster
  • Pydantic config — validated configuration with YAML override support
  • Rich output — beautiful terminal tables, with --output json for scripting

  • Quickstart


    Install Krayne and create your first cluster in under 5 minutes.

    Get started

  • Core Concepts


    Understand Ray clusters, KubeRay, and the cluster lifecycle.

    Learn more

  • CLI Reference


    Full reference for every krayne command, flag, and option.

    CLI docs

  • Python SDK


    Use Krayne programmatically in scripts, notebooks, and pipelines.

    SDK docs