Skip to content

Quickstart

Get from zero to a running Ray cluster in under 5 minutes.


Prerequisites

  • Python 3.10+
  • One of:
    • A Kubernetes cluster with the KubeRay operator installed
    • Docker (for the local sandbox — no existing cluster needed)

1. Install Krayne

pip install krayne

Verify the installation:

$ krayne --version
krayne 0.1.0

2. Connect to a cluster

Choose one of two paths:

Spin up a local k3s cluster with KubeRay pre-installed:

krayne sandbox setup

krayne sandbox setup output

The sandbox requires Docker with at least 2 CPUs and 6 GB RAM.

Then run krayne init to select the sandbox kubeconfig:

krayne init

Select "Sandbox kubeconfig" when prompted. Krayne auto-selects the default context:

krayne init output

Point Krayne at your kubeconfig:

krayne init

This interactively selects your kubeconfig file and Kubernetes context, then saves the settings to ~/.krayne/config.yaml.

Non-interactive mode

krayne init --kubeconfig ~/.kube/config --context my-context

3. Create your first cluster

krayne create my-first-cluster

krayne create output

Local access

To access cluster services from your machine, use krayne tun-open my-first-cluster to create localhost port-forwards. Use krayne tun-close my-first-cluster to stop.

This creates a cluster with sensible defaults:

  • Head node: 15 CPUs, 48 Gi memory
  • 1 worker: 15 CPUs, 48 Gi memory
  • Services: Jupyter notebook + SSH enabled

4. Check your cluster

List all clusters:

$ krayne get

krayne get output

Get detailed information:

$ krayne describe my-first-cluster

krayne describe output

5. Clean up

krayne delete my-first-cluster --force

If you used the sandbox, you can tear it down:

krayne sandbox teardown

What's next