ray-on-k8s-engineer

Deploy, secure, and operate KubeRay clusters and Ray workloads on GPU Kubernetes.

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/Cloud-Byte-Consulting/plugins --skill ray-on-k8s-engineer-cloud-byte-consulting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ray-on-k8s-engineer
Source: https://github.com/Cloud-Byte-Consulting/plugins/tree/main/model-training-ops/skills/ray-on-k8s-engineer
Command: npx skills add https://github.com/Cloud-Byte-Consulting/plugins --skill ray-on-k8s-engineer-cloud-byte-consulting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running Ray on Kubernetes with default settings leaves clusters insecure (public dashboard equals remote code execution), wastes GPU budget on idle workers, and produces untracked hyperparameter sweeps. This Skill provides an operating standard for standing up KubeRay clusters, running Ray Tune sweeps, and hardening Ray workloads on managed GPU Kubernetes. ## Core Features & Use Cases - KubeRay cluster design: Choose between ephemeral RayJob clusters and permanent RayClusters, define CPU and GPU worker groups with scale-from-zero, and build custom CUDA-based images. - Hyperparameter optimization with Ray Tune: Configure trainables, search spaces, search algorithms (grid, random, Bayesian), ASHA early stopping, and MLflow tracking so sweeps log as comparable parent-child runs. - Observability and hardening: Wire Prometheus PodMonitors, Grafana alerts, and application-level metrics, then apply a security checklist covering NetworkPolicies, credential isolation, and dashboard access control. - Use Case: A research team needs to run a 100-trial learning-rate sweep on GPU nodes. Use this Skill to submit an ephemeral RayJob with fractional GPU allocation, ASHA early stopping, and MLflow logging, then verify no unauthenticated pod can reach the Ray dashboard. ## Quick Start Use the ray-on-k8s-engineer skill to create a RayJob manifest and Tune sweep configuration for training on my GPU Kubernetes cluster with MLflow tracking.

Frequently Asked Questions about ray-on-k8s-engineer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy Ray on Kubernetes with KubeRay?

Install the KubeRay operator via Helm in its own namespace, then define RayCluster, RayJob, or RayService manifests with head and worker pod specifications. Use RayJob for ephemeral training runs and RayCluster for long-lived interactive work.

How do I run hyperparameter sweeps with Ray Tune on Kubernetes?

Define a trainable that reports metrics per iteration, a search space with log-uniform ranges, a search algorithm, and the ASHA scheduler for early stopping. Set resources_per_trial to share GPU workers and attach the MLflow callback so trials log under one parent run.

Should I use ephemeral RayJob clusters or a permanent RayCluster?

Ephemeral RayJobs give full library isolation and release GPUs at job end, making them the default for training pipelines. Permanent clusters suit interactive work and cached datasets but risk config drift, GPU leaks, and multitenancy issues, so recycle them weekly.

Can I use fractional GPUs with Ray tasks?

Yes, set num_gpus to a fraction like 0.25 in @ray.remote to pack small tasks onto one card. Ray enforces bookkeeping only, not memory isolation, so co-located tasks must fit within VRAM, and max_calls=1 can force worker restarts to release GPU memory.

Why is exposing the Ray dashboard a security risk?

The Ray dashboard on port 8265 shares its port with the Job API, which allows arbitrary code execution by design. Never expose it publicly; access it only via kubectl port-forward or an authenticated ingress, and restrict access with NetworkPolicies.

How do I monitor Ray clusters with Prometheus?

Fix the Ray metrics export port and create two PodMonitors, one for the head and one for workers, since no label spans a whole Ray cluster. Add Grafana alerts for pending tasks, object-store spill, and GPU utilization, plus application-level metrics via ray.util.metrics.