Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CR(D) Wizard is a web and tui based dashboard designed to provide a clear and intuitive interface for visualizing and exploring Kubernetes Custom Resource Definitions (CRDs) and their corresponding Custom Resources (CRs). It helps k8s users to quickly understand the state of their custom controllers and the resources they manage.

License

Notifications You must be signed in to change notification settings

pehlicd/crd-wizard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CR(D) Wizard

go version release license go report

CR(D) Wizard is a tool designed to provide a clear and intuitive interface for visualizing and exploring Kubernetes Custom Resource Definitions (CRDs) and their corresponding Custom Resources (CRs). It helps developers and cluster administrators quickly understand the state of their custom controllers and the resources they manage.

CR(D) Wizard is available as both a web-based dashboard and a TUI (Text-based User Interface). This allows you to choose the interface that best suits your workflow, whether you prefer a graphical interface or a lightweight, terminal-based view.


Web UI
TUI

How to install

Krew

kubectl krew install crd-wizard

Homebrew

brew tap pehlicd/crd-wizard https://github.com/pehlicd/crd-wizard
brew install crd-wizard

Arch Linux

${aurHelper:-paru} -S crd-wizard-bin

One Script Installer

You can install the latest version with one command:

sh -c "$(curl -sSflL 'https://raw.githubusercontent.com/pehlicd/crd-wizard/main/install.sh')"

Advanced Usage

Install a specific version: Set the CRD_WIZARD_VERSION environment variable.

CRD_WIZARD_VERSION="0.0.1" sh -c "$(curl -sSflL 'https://raw.githubusercontent.com/pehlicd/crd-wizard/main/install.sh')"

Install to a custom directory: Pass the desired path as an argument.

sh -c "$(curl -sSflL 'https://raw.githubusercontent.com/pehlicd/crd-wizard/main/install.sh')" -- /my/custom/bin

Using Go Install

go install github.com/pehlicd/crd-wizard@latest

Kubernetes Deployment

You can deploy CRD Wizard to your Kubernetes cluster using Kustomize.

Default Deployment (uses latest tag):

kubectl apply -k deploy/k8s/base

Install directly from GitHub: You can also deploy directly without cloning the repository:

kubectl apply -k 'github.com/pehlicd/crd-wizard/deploy/k8s/base?ref=main'

Custom Deployment (specify version): If you need to use a specific version due to cluster policies or stability requirements:

cd deploy/k8s/base
kustomize edit set image ghcr.io/pehlicd/crd-wizard:v0.1.6
kubectl apply -k .

The deployment includes:

  • Deployment: Runs the web server.
  • Service: Exposes port 80 utilizing port 8080.
  • Ingress: Provides external access (check deploy/k8s/base/ingress.yaml for annotations).
  • RBAC: ClusterRole with extensive permissions to visualize all resources.

How to Use

Using CR(D) Wizard is super simple. Just run the following command:

crd-wizard web

OR if you don't want to leave your terminal run:

crd-wizard tui

k9s plugin

plugins:
  crd-wizard:
    shortCut: Shift-W
    description: CRD Wizard
    dangerous: false
    scopes:
      - crds
    command: bash
    background: false
    confirm: false
    args:
      - -c
      - "crd-wizard tui --kind $COL-KIND"

Documentation Generator

CR(D) Wizard includes a powerful documentation generator that can convert your CRDs into beautiful, readable HTML or Markdown files.

Features

  • Live Preview: Real-time preview of your documentation as you edit or upload CRDs.
  • Multiple Inputs: Support for raw YAML/JSON, file uploads, and direct Git Provider URLs (GitHub/GitLab).
  • Export Formats: Export as standalone HTML pages or Markdown (ideal for READMEs).
  • Batch Export: Export documentation for all CRDs in your cluster at once as a ZIP archive.

Usage

  1. Navigate to the Generator page in the Web UI.
  2. Input:
    • Paste raw CRD content.
    • Upload a file.
    • Or paste a Git URL (e.g., https://github.com/prometheus-operator/.../alertmanager.yaml).
  3. Preview: Instantly see how the documentation looks.
  4. Export: Click "Download" to save the file.
  5. Batch Export: On the main CRD list page, click the "Export All" button in the toolbar to download a ZIP of all CRDs.

CLI Usage

You can also generate documentation directly from the CLI:

# From a local file
crd-wizard generate -f path/to/crd.yaml

# From a Git URL
crd-wizard generate --url https://github.com/user/repo/blob/main/crd.yaml

# Export a single CRD from the cluster
crd-wizard export alertmanagers.monitoring.coreos.com

# Export all CRDs to Markdown
crd-wizard export --all --format md --output ./docs/

AI Capabilities

CR(D) Wizard integrates with LLMs to provide intelligent documentation and explanations for your CRDs.

Configuration

You can enable AI features by passing the --enable-ai flag. By default, it uses Ollama running locally.

Ollama (Default):

crd-wizard tui --enable-ai
# Defaults to http://localhost:11434 and model 'llama3.1'

Google Gemini:

crd-wizard tui --enable-ai \
  --ai-provider gemini \
  --gemini-api-key "YOUR_API_KEY"

Usage

TUI

In the CRD list view, navigate to a CRD and press a. An overlay will appear showing the AI-generated analysis of the CRD schema.

Web Interface

When AI is enabled, the web interface exposes AI features (via /crd/generate-context endpoint) to provide insights directly in the dashboard.

Multi-Cluster Support

CR(D) Wizard supports managing CRDs across multiple Kubernetes clusters seamlessly. It automatically discovers all contexts defined in your kubeconfig file.

Features

  • Auto-Discovery: Automatically loads all valid contexts from ~/.kube/config.
  • Context Switching: Switch between clusters instantly without restarting the application.
  • Unified Interface: Available in both the Web UI and TUI.

Usage

  • Web UI: Use the cluster selector dropdown in the top navigation bar to switch contexts. The selection persists across sessions.
  • TUI: Press c to open the cluster selection dialog and switch contexts instantly.

How to contribute

If you'd like to contribute to CR(D) Wizard, feel free to submit pull requests or open issues on the GitHub repository. Your feedback and contributions are highly appreciated!

Contributors

Thank you for contributing, you're awesome 🫶

License

This project is licensed under the GPL-3.0 - see the LICENSE file for details.

About

CR(D) Wizard is a web and tui based dashboard designed to provide a clear and intuitive interface for visualizing and exploring Kubernetes Custom Resource Definitions (CRDs) and their corresponding Custom Resources (CRs). It helps k8s users to quickly understand the state of their custom controllers and the resources they manage.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 5