3 Star 31 Fork 5

weibaohui / blazork8s

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
MIT

Build

Blazor k8s

English 中文

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.
  • Colorful and intuitive display of Kubernetes resources.
  • Yaml-defined fields are analyzed and displayed in a tree structure, accompanied by documentation. Additionally, translation using a large model is available, eliminating concerns about forgetting definitions.
  • Detailed explanations of Kubernetes resource fields, ensuring no ambiguity about the number of options and their meanings.Official documentation with clickable links.
  • Integration of official examples in a directory tree format, allowing easy browsing, reference, and field copying.
  • Support efficient editing of YAML resources, enabling writing YAML fields on one side of the page while referring to field definitions at the same time.
  • Support displaying corresponding Service and Ingress on the Pod page, and support displaying backend Pods on the Service and Ingress pages.
  • Generation of Yaml 、Problem analysis、Security checks using a large model.
  • Support conversational k8s functionality operations, such as semantic commands to check the running status of pods in the default namespace.
  • Display resource usage dynamically (requires installation of metric server), and support viewing detailed statistical data* Integration of page functionalities such as kubectl describe, kubectl explain, kubectl top and other high-frequency commands. These can be accessed with a simple click on the user interface.
  • Inspection functionality added to the cluster page, conducting common error checks on major resource objects and providing detailed lists.
  • Supports Chinese, English, as well as French, German, Italian, Russian, Spanish, French, Japanese, Korean, and 12 languages.
  • Visualize the relationships and states between workload resources intuitively through a topology diagram.

☀️ License

BlazorK8s

k8s install

Create a small Kubernetes cluster using KinDMiniKube

KinD way

  • install KinD on mac with brew.
brew install kind
  • Create a new Kubernetes cluster.
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
  • View the ui: By default, it uses NodePort for access. Please visit port 31999, or configure Ingress on your own. http://NodePortIP:31999

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.0

ARM Run (Mac M1/2/3)

docker run -it --rm    -v ~/.kube/:/root/.kube/ -p 4000:8080 ghcr.io/weibaohui/blazork8s:0.2.0-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-xxx",
    "Model": "gpt-3.5-turbo",
    "BaseUrl": "https://api.openai.com/v1"
  },
  "GeminiAI": {
    "APIKey": "AIxxxxxxx7dd3494880a7920axxxxxxxxx",
    "Model": "gemini-pro"
  }

Effectiveness

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



Explanation of Field Meanings

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

  • Use kubectl to obtain Kubernetes explanations
  • Using a configured AI large model for intelligent interpretation, the results are as follows:

Generate deployment YAML


Obtain k8s deployment YAML through prompts and execute

Intelligent Analysis

Added intelligent analysis and security analysis buttons on each resource.

Workload Diagram

Visualize the relationships and states between workload resources intuitively through a topology diagram

List of inspectable resources

  • Node
  • Pod
  • Deployment
  • StatefulSet
  • ReplicaSet
  • CronJob
  • Ingress
  • Service/Endpoints
  • PersistentVolumeClaim
  • NetworkPolicy
  • HorizontalPodAutoscaler

UI preview

click me

MIT License Copyright (c) 2021 weibaohui Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

使用C# Blazor 编写的kubernetes管理工具,集成了ChatGPT智能检测能力,用简单易用的操作界面,提升k8s管理效率。 expand collapse
C# and 6 more languages
MIT
Cancel

Releases (10)

All

Contributors

All

Activities

Load More
can not load any more
C#
1
https://gitee.com/weibaohui/blazork8s.git
git@gitee.com:weibaohui/blazork8s.git
weibaohui
blazork8s
blazork8s
main

Search