Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
30310a8
cluster-api: Bump @kinvolk/headlamp-plugin dependency version from ^0…
ChayanDass Mar 31, 2026
fcc9561
cluster-api: Refactor ReplicaHelpers and Resource components for impr…
ChayanDass Mar 31, 2026
d545a57
cluster-api: machine: Refactor Machine interfaces and enhance status …
ChayanDass Mar 31, 2026
2e1a960
cluster-api: details: Enhance MachineDetail component with improved s…
ChayanDass Mar 31, 2026
cc5336a
cluster-api:List: enhance condition status rendering in MachineList c…
ChayanDass Mar 31, 2026
214f4bb
cluster-api: Machineset: Refactor MachineSet interfaces and enhance s…
ChayanDass Mar 31, 2026
a5d8a8b
cluster-api:Detail: Refactor MachineSetDetail component for improved …
ChayanDass Mar 31, 2026
4101fec
cluster-api: List:Refactor MachineSetsList component for enhanced fun…
ChayanDass Mar 31, 2026
7fca0f9
cluster-api: MachineDeployment: Refactor interfaces and enhance statu…
ChayanDass Mar 31, 2026
5246cde
cluster-api:List: Refactor MachineDeploymentsList component for enhan…
ChayanDass Mar 31, 2026
5694c13
cluster-api: Detail: Refactor MachineDeploymentDetail component for i…
ChayanDass Mar 31, 2026
b4eefb0
cluster-api: KubeadmControlPlane: Introduce new interfaces and enhanc…
ChayanDass Mar 31, 2026
f8bab97
cluster-api: KubeadmControlPlane: Refactor detail and list components…
ChayanDass Mar 31, 2026
c6422f4
cluster-api: KubeadmConfig: Refactor interfaces and enhance status ma…
ChayanDass Mar 31, 2026
850503e
cluster-api: KubeadmConfig: Refactor detail and list components for i…
ChayanDass Mar 31, 2026
2aa8065
cluster-api: Cluster: Refactor and enhance API versioning and status …
ChayanDass Mar 31, 2026
24a9f14
cluster-api: Cluster: Refactor detail and list components for enhance…
ChayanDass Mar 31, 2026
f6925a5
cluster-api: Update exports in common index file to enhance component…
ChayanDass Mar 31, 2026
e42a0e4
cluster-api: ClusterClass: Refactor and enhance interfaces for API ve…
ChayanDass Mar 31, 2026
c16a31a
cluster-api: ClusterClass: Enhance ClusterClass components with detai…
ChayanDass Mar 31, 2026
ace1dd8
cluster-api: Add ScaleButton component for scaling resources
ChayanDass Mar 31, 2026
0aa9073
cluster-api:MachineDrainRule: Enhance MachineDrainRule components wit…
ChayanDass Mar 31, 2026
908815a
cluster-api: KubeadmConfigsList: Refactor data rendering and enhance …
ChayanDass Mar 31, 2026
f6e733a
cluster-api: KubeadmConfigTemplate: Refactor detail and list componen…
ChayanDass Mar 31, 2026
2f746f2
cluster-api: KubeadmControlPlaneTemplate: Enhance detail and list com…
ChayanDass Mar 31, 2026
19100ac
cluster-api: MachineHealthCheck: Refactor components for dynamic API …
ChayanDass Mar 31, 2026
78fd1b0
cluster-api:MachinePool: Refactor MachinePool components for dynamic …
ChayanDass Mar 31, 2026
03647b4
cluster-api: ClustersList: Add CP and Worker Replicas columns for enh…
ChayanDass Apr 1, 2026
f76d664
cluster-api: MachineDetail: Add Machine Template section and refactor…
ChayanDass Apr 1, 2026
bc4e5c3
cluster-api: Refactor Resource and TemplateSection components for enh…
ChayanDass Apr 1, 2026
700fc00
cluster-api: Refactor OwnedMachinesSection for improved ownership log…
ChayanDass Apr 1, 2026
453e287
cluster-api: Introduce CapiRouteWrapper and Dashboard component for i…
ChayanDass Apr 1, 2026
ceaaf24
cluster-api: Refactor ReplicaHelpers, Resource, and ScaleButton compo…
ChayanDass Apr 2, 2026
28856dd
cluster-api: MachinePool: Refactor MachinePoolDetail and List compone…
ChayanDass Apr 2, 2026
5e453ed
cluster-api: Refactor Cluster and KubeadmControlPlane classes for imp…
ChayanDass Apr 2, 2026
d4ea2a2
cluster-api: Update README.md to enhance documentation for Cluster AP…
ChayanDass Apr 2, 2026
13d8358
cluster-api: Update getPhaseStatus function to return 'warning' for u…
ChayanDass Apr 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
180 changes: 174 additions & 6 deletions cluster-api/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,179 @@
# cluster-api
<!-- markdownlint-disable MD033 -->
<div align="center">

The Headlamp plugin for Cluster API adds a "Cluster API" item to Headlamp's sidebar and displays CAPI resources such as clusters, machines, and machine deployments on the Map.
# 🐢 Cluster API Plugin for Headlamp

## Installation
**A comprehensive, professional-grade Headlamp plugin for managing Kubernetes Cluster API (CAPI) resources.**

Coming soon!
[![TypeScript](https://img.shields.io/badge/TypeScript-5.6.2-blue.svg)](https://www.typescriptlang.org/)
[![Headlamp Plugin](https://img.shields.io/badge/Headlamp-Plugin-green.svg)](https://headlamp.dev/)
[![Cluster API](https://img.shields.io/badge/Cluster%20API-v1beta1%20%2F%20v1beta2-orange.svg)](https://cluster-api.sigs.k8s.io/)

## More information about Cluster API
</div>

For more information about Cluster API, see the [Cluster API Book](https://cluster-api.sigs.k8s.io/).
## <!-- markdownlint-enable MD033 -->

## 📖 Overview

The **Cluster API Plugin** enriches Headlamp with a powerful, intuitive graphical interface for declarative cluster lifecycle management using Kubernetes Cluster API (CAPI).

By introducing a fully-featured **"Cluster API"** section into the Headlamp sidebar and integrating deeply with Headlamp’s interactive map, this plugin transforms complex multi-cluster operations into a visual and highly interactive experience.

---

## 🎯 Why this Plugin?

Managing Cluster API resources via CLI can be complex and error-prone. This plugin provides:

- Visual cluster relationships (no more YAML hunting)
- Faster debugging with real-time status insights
- Simplified scaling & operations via UI
- Improved developer experience for multi-cluster environments

---

## 📸 Screenshots

### 🖥️ Dashboard View

![Main Plugin Dashboard](https://github.com/user-attachments/assets/3ab4b887-67de-4a9b-a29a-99e5446487e0)

### 🗺️ Map View Visualization

![Map View](https://github.com/user-attachments/assets/f659e62e-c89c-4c6e-a1da-17bf352f437c)

---

## ✨ Key Features

### 🌟 Interactive Operations & Visualization

- **Map View Integration**: Visualize CAPI resources with clear ownership relationships
- **Direct Resource Scaling**: Scale nodes via custom UI controls
- **1-Click Kubeconfig Download**: Fetch workload cluster configs instantly
- **Glance Tooltips**: Hover-based quick insights for faster debugging

---

### 🔍 Comprehensive Resource Insights

- **Rich Status Monitoring**: Human-readable conditions (Ready, Paused, Error)
- **Unified Template Rendering**: Clear visualization of ClusterClass configs
- **Owned Resource Tracking**: Easily map machines to parents

---

### 🛡️ First-Class Compatibility

- **API Agnostic**: Supports `v1beta1` and `v1beta2`
- **Provider Agnostic**: Works with Docker, AWS, Azure, GCP, vSphere, etc.

---

## 💡 Use Cases

- Platform engineers managing multi-cluster environments
- Developers testing Cluster API locally (CAPD, etc.)
- Teams debugging cluster provisioning issues
- Learning and visualizing Cluster API architecture

---

## 🏗️ Supported Resources

| Resource | Description | v1beta1 | v1beta2 | Scalable |
| -------------------------------- | ------------------------------------- | :-----: | :-----: | :------: |
| **Clusters** | Core cluster lifecycle | ✅ | ✅ | ❌ |
| **ClusterClasses** | Reusable templates | ✅ | ✅ | ❌ |
| **KubeadmControlPlanes** | Control plane lifecycle | ✅ | ✅ | ✅ |
| **KubeadmControlPlaneTemplates** | Control plane templates | ✅ | ✅ | ❌ |
| **MachineDeployments** | Rolling updates and declarative nodes | ✅ | ✅ | ✅ |
| **MachinePools** | Dynamic machine pools | ✅ | ✅ | ✅ |
| **MachineSets** | Replica management | ✅ | ✅ | ✅ |
| **Machines** | Individual instances | ✅ | ✅ | ❌ |
| **KubeadmConfigs** | Bootstrap configs | ✅ | ✅ | ❌ |
| **KubeadmConfigTemplates** | Bootstrap templates | ✅ | ✅ | ❌ |
| **MachineHealthChecks** | Auto remediation | ✅ | ✅ | ❌ |
| **MachineDrainRules** | Drain & termination control | ✅ | ✅ | ❌ |

---

## ⚡ Quick Start

### 1. Set Up Cluster API

Follow the official guide:
👉 https://cluster-api.sigs.k8s.io/user/quick-start.html

---

### 2. Install Plugin

#### For Users

1. Open **Headlamp**
2. Go to **Plugin Catalog**
3. Search **Cluster API**
4. Click **Install**

---

#### For Developers

```bash
git clone https://github.com/headlamp-k8s/plugins.git
cd plugins/cluster-api
npm install
npm run start
```

## 🛠️ Project Architecture

```text
cluster-api/
├── package.json
├── tsconfig.json
└── src/
├── components/ # Reusable UI components (tables, buttons, tooltips)
├── resources/ # CAPI resource definitions & renderers
├── utils/ # Helper functions and shared logic
└── index.tsx # Plugin entry point


```

The project is built using React and TypeScript, ensuring a scalable, maintainable, and type-safe architecture aligned with the Headlamp plugin ecosystem.

## 🐛 Troubleshooting

| Issue | Solution |
| --------------------- | ------------------------------------------------------------ |
| Plugin not visible | Ensure Headlamp is updated and plugin is enabled |
| Resources not loading | Verify CAPI CRDs: `kubectl get crd \| grep cluster.x-k8s.io` |
| Permission issues | Check RBAC for Headlamp ServiceAccount |
| Build errors | Run: `rm -rf node_modules package-lock.json && npm install` |

---

## 🤝 Contributing

We welcome contributions from the community!

1. Fork the repository
2. Create a new branch (`feature/your-feature`)
3. Commit your changes
4. Push to your fork
5. Open a Pull Request

Please ensure your code follows project standards and includes tests where applicable.

---

## 📚 Resources

- Headlamp Plugin Docs: https://headlamp.dev/docs/latest/tutorials/plugin-development/
- Cluster API Docs: https://cluster-api.sigs.k8s.io/

---

**Built with ❤️ for the Kubernetes ecosystem**
Loading
Loading