Skip to content

Commit 72a91bc

Browse files
committed
kubeflow: add base plugin structure and foundation plan
Signed-off-by: alokdangre <alokdangre@gmail.com>
1 parent 2ec38ff commit 72a91bc

File tree

16 files changed

+19444
-0
lines changed

16 files changed

+19444
-0
lines changed

kubeflow/.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Dependencies
2+
node_modules/
3+
npm-debug.log
4+
yarn-debug.log
5+
yarn-error.log
6+
.pnpm-debug.log
7+
8+
# Build outputs
9+
dist/
10+
build/
11+
lib/
12+
coverage/
13+
14+
# Environment and config
15+
.env
16+
.env.local
17+
.env.*.local
18+
19+
# IDE and editor files
20+
.idea/
21+
.vscode/
22+
*.swp
23+
*.swo
24+
.DS_Store
25+
26+
# Cache and temporary files
27+
.npm
28+
.eslintcache
29+
.tsbuildinfo

kubeflow/README.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
2+
# Kubeflow Plugin for Headlamp
3+
4+
## Purpose
5+
The Kubeflow plugin for Headlamp provides an operator-focused UI for managing and observing Kubeflow resources running in your Kubernetes clusters. It seamlessly detects available Kubeflow dependencies by natively checking the cluster APIs for Custom Resource Definitions (CRDs).
6+
7+
Instead of duplicating the Kubeflow Central Dashboard, this plugin augments it by providing deep, Kubernetes-centric observability. It helps operators inspect the underlying cluster health, pods, exact status conditions, and detailed configurations of complex Machine Learning workloads.
8+
9+
**Key Feature:** The plugin auto-detects installed features dynamically. You don't need the entire Kubeflow platform to use this plugin! If you install only Katib or only Notebooks via Helm/Kustomize, the plugin will recognize what is available and unlock precisely those specific UI sections in the Headlamp sidebar.
10+
11+
## Supported Components and CRDs
12+
The plugin currently supports the following modular Kubeflow AI families:
13+
* **Notebooks** (`kubeflow.org/v1`): `Notebook`, `Profile`, `PodDefault`
14+
* **Pipelines** (`pipelines.kubeflow.org/v2beta1`): `Pipeline`, `PipelineVersion`
15+
* **Katib / AutoML** (`kubeflow.org/v1beta1`): `Experiment`, `Trial`, `Suggestion`
16+
* **Training Operators** (`trainer.kubeflow.org/v1alpha1`): `TrainJob`, `TrainingRuntime`, `ClusterTrainingRuntime`
17+
* **Spark Operators** (`sparkoperator.k8s.io/v1beta2`): `SparkApplication`, `ScheduledSparkApplication`
18+
19+
## Installation of Kubeflow Components
20+
Kubeflow is a very large platform, and it is common to install only the systems your team requires. Our plugin is fully compatible with modular installations.
21+
22+
For full installation workflows across different environments, review the [upstream Kubeflow Manifests Repository](https://github.com/kubeflow/manifests).
23+
24+
Below are examples of how operators can apply components piece-by-piece via `kustomize` (assuming you have cloned the upstream repo):
25+
26+
**Notebooks Support:**
27+
```bash
28+
kustomize build applications/jupyter/notebook-controller/upstream/crd/bases | kubectl apply -f -
29+
kustomize build applications/jupyter/notebook-controller/upstream/overlays/kubeflow | kubectl apply -f -
30+
```
31+
32+
**Katib (AutoML) Support:**
33+
```bash
34+
# From the root of the cloned kubeflow/manifests repository:
35+
kustomize build applications/katib/upstream/installs/katib-with-kubeflow | kubectl apply -f -
36+
```
37+
38+
**Training Operators:**
39+
```bash
40+
kustomize build applications/trainer/upstream/base | kubectl apply -f -
41+
```
42+
43+
**Kubeflow Pipelines (Cloud-Native Mode):**
44+
```bash
45+
kustomize build applications/pipeline/upstream/env/cert-manager/platform-agnostic-multi-user-k8s-native | kubectl apply -f -
46+
```
47+
48+
*Note: Headlamp will always dynamically scan and gracefully handle missing CRDs based on whichever installation method you choose, including experimental Helm charts.*
49+
50+
## Developer Testing (Lightweight Sandbox)
51+
For UI plugin contributors, a full Kubeflow controller installation is not required and would drain considerable local CPU resources. A lightweight "CRD-only" setup using Headlamp's native probing design is highly recommended.
52+
53+
1. Create a lightweight `kind` cluster:
54+
```bash
55+
kind create cluster --name headlamp-kubeflow
56+
kubectl config use-context kind-headlamp-kubeflow
57+
```
58+
59+
2. Apply **only the CRDs** directly from upstream. This guarantees near-zero cluster CPU usage while completely activating all native UI tabs within the Headlamp plugin:
60+
61+
**Notebooks & Multi-Tenancy:**
62+
```bash
63+
kubectl apply -f https://raw.githubusercontent.com/kubeflow/manifests/master/applications/jupyter/notebook-controller/upstream/crd/bases/kubeflow.org_notebooks.yaml
64+
kubectl apply -f https://raw.githubusercontent.com/kubeflow/manifests/master/applications/profiles/upstream/crd/bases/kubeflow.org_profiles.yaml
65+
kubectl apply -f https://raw.githubusercontent.com/kubeflow/manifests/master/applications/admission-webhook/upstream/base/crd.yaml
66+
```
67+
68+
**Katib:**
69+
```bash
70+
kubectl apply -f https://raw.githubusercontent.com/kubeflow/manifests/master/applications/katib/upstream/components/crd/experiment.yaml
71+
kubectl apply -f https://raw.githubusercontent.com/kubeflow/manifests/master/applications/katib/upstream/components/crd/trial.yaml
72+
kubectl apply -f https://raw.githubusercontent.com/kubeflow/manifests/master/applications/katib/upstream/components/crd/suggestion.yaml
73+
```
74+
75+
**Pipelines:**
76+
```bash
77+
kubectl apply -f https://raw.githubusercontent.com/kubeflow/manifests/master/applications/pipeline/upstream/base/crds/pipelines.kubeflow.org_pipelines.yaml
78+
kubectl apply -f https://raw.githubusercontent.com/kubeflow/manifests/master/applications/pipeline/upstream/base/crds/pipelines.kubeflow.org_pipelineversions.yaml
79+
```
80+
81+
**Training Operators:**
82+
```bash
83+
kubectl apply -f https://raw.githubusercontent.com/kubeflow/manifests/master/applications/trainer/upstream/base/crds/trainer.kubeflow.org_trainjobs.yaml
84+
kubectl apply -f https://raw.githubusercontent.com/kubeflow/manifests/master/applications/trainer/upstream/base/crds/trainer.kubeflow.org_trainingruntimes.yaml
85+
kubectl apply -f https://raw.githubusercontent.com/kubeflow/manifests/master/applications/trainer/upstream/base/crds/trainer.kubeflow.org_clustertrainingruntimes.yaml
86+
```
87+
88+
## Running the Plugin Locally
89+
90+
To test modifications dynamically:
91+
92+
1. Start the Plugin Watcher under your `plugins/kubeflow` directory:
93+
```bash
94+
npm install
95+
npm run start
96+
```
97+
*Note: This will watch for changes and compile the plugin into your local Headlamp plugins folder (e.g., `~/.config/Headlamp/plugins/` on Linux).*
98+
99+
2. Launch Headlamp:
100+
- **Using the Desktop App:** Simply open your installed Headlamp application.
101+
- **From Source:** Clone the [Headlamp repository](https://github.com/headlamp-k8s/headlamp) in a separate directory and start the application following its developer guide (e.g., `make run-backend` and `npm start` in the `frontend` folder).
102+
103+
As long as the plugin watcher is running, any changes saved in the `src/` directory will automatically hot-reload inside Headlamp!

kubeflow/artifacthub-pkg.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 0.1.0
2+
name: headlamp_kubeflow
3+
displayName: Kubeflow
4+
createdAt: "2024-03-17T00:00:00Z"
5+
description: A UI for viewing and managing Kubeflow resources in Headlamp.
6+
annotations:
7+
headlamp/plugin/version-compat: ">=0.22"
8+
headlamp/plugin/distro-compat: "in-cluster,web,docker-desktop,desktop"

0 commit comments

Comments
 (0)