Home

Awesome

Build

<p align="center"> <img src="/BlazorApp/wwwroot/pro_icon.svg" /> </p> <h1 align="center">Blazor k8s</h1> <div align="center"> <a href="Readme.md">English</a> | <a href="Readme_cn.md">中文</a> </div>

A Kubernetes management tool written in C# Blazor, integrating the ChatGPT large models. It features a user-friendly interface for easy and efficient Kubernetes administration. Particularly suitable for beginners, it offers various convenient functionalities to help novices grasp Kubernetes knowledge.

☀️ License

BlazorK8s

k8s install

Create a small Kubernetes cluster using KinDMiniKube

KinD way

brew install kind
kind create cluster --name k8sgpt-demo

Deploy BlazorK8s to a cluster and experience it:

kubectl apply yaml

kubectl apply -f https://raw.githubusercontent.com/weibaohui/blazork8s/main/deploy/deployment.yaml

Start a Docker image to experience it

x86 Run

Note: When using Docker Desktop, you need to handle the access domain address of the API server yourself. Ensure that it is accessible within the Docker environment.

docker run -it --rm    -v ~/.kube/:/root/.kube/ -p 4000:8080 ghcr.io/weibaohui/blazork8s:0.2.7

ARM Run (Mac M1/2/3)

docker run -it --rm    -v ~/.kube/:/root/.kube/ -p 4000:8080 ghcr.io/weibaohui/blazork8s:0.2.7-arm

Debug

 git clone git@github.com:weibaohui/blazork8s.git
 cd blazork8s/BlazorApp
 dotnet watch run

Interface Language Configuration

The interface defaults to displaying in Chinese. To set a default display in another language, modify the appsettings.json in the source code's BlazorApp directory or the image's /app/appsettings.json.

"SimpleI18n": {
"LocaleFilesPath": "wwwroot/lang",
"DefaultCultureName": "LANGUAGE"
}

The available values for LANGUAGE include

{
  "en-US": "English",
  "zh-CN": "中文(Chinese)",
  "es": "Español (Spanish)",
  "ru": "Русский (Russian)",
  "pt-br": "Português (Portuguese)",
  "pl": "Polski (Polish)",
  "ko": "한국어 (Korean)",
  "ja": "日本語 (Japanese)",
  "fr": "Français (French)",
  "de": "Deutsch (German)",
  "hi": "हिंदी (Hindi)",
  "it": "Italiano (Italian)"
}

ChatGPT config

Modify the appsettings.json in the BlazorApp directory or /app/appsettings.json in the image.

  "AI": {
    "Enable": true, //enabled
    "Select": "OpenAI" //choose a model from below
  },
  "OpenAI": {
    "Token": "sk-kkkkkkkkkkkkkkkkkkkk",
    "Model": "alibaba/Qwen2-7B-Instruct",
    "BaseUrl": "https://api.siliconflow.cn/v1"
  },
  "GeminiAI": {
    "APIKey": "AIxxxxxxx7dd3494880a7920axxxxxxxxx",
    "Model": "gemini-pro"
  }

Effectiveness

DocTree expands YAML definitions in a tree-like structure, no longer worry about forgetting the definitions.

<br> <img src="/docs/img/doc-tree.gif"> <br>

Explanation of Field Meanings

Click on the question mark next to the field on the resource details page.

Generate deployment YAML

<br> Obtain k8s deployment YAML through prompts and execute <br> <img src="/docs/img/gpt-deploy.gif"> <br>

Intelligent Analysis

Added intelligent analysis and security analysis buttons on each resource. <br> <img src="/docs/img/POD-analyze.gif"> <br>

Workload Diagram

Visualize the relationships and states between workload resources intuitively through a topology diagram <img src="/docs/img/deploy-diagram.jpg"> <img src="/docs/img/diagram.gif"> <br>

GatewayAPI support

UI preview

click me