基于 K8S 的云应用平台 后端代码

cloudApp 基于 K8S 的云应用平台

cloud-app是基于k8s的简单易用的云应用平台,借助它可以快速安装部署各种应用,或者一键安装helm chart包,大幅提升k8s应用部署的效率。注意cloud-app的定位是应用的安装部署等操作,不是k8s的管理界面。

这里是后端代码,前端代码见这 前端代码

预览地址

cloud-app 用户名:cloud-app 密码123456

偶尔访问不通可能是因为服务器在重启 ̄□ ̄||

功能特性

  • 官方应用:

1.在 应用商店>官方应用 中,点击创建按钮,选择版本(版本号全部来自dockerhub),选择CPU大小,内存大小,磁盘大小,存储类型。输入必要的PASSWORD等环境变量,便可快速创建应用。

2.在 应用管理>官方应用 中,可以对刚才创建的应用进行重启,创建数据快照,从快照恢复数据(不怕删库跑路了),升级版本等一系列操作。

  • Helm官方仓库chart包安装:

1.应用商店>Helm仓库 中,对接到Helm官方仓库,可以在Helm详情页点击 自动安装 按钮 一键安装chart包,安装前还可以可视化编辑Helm安装使用的values

2.应用商店>Helm仓库中的所有chart包都能安装,这可能是安装Helm包最简单的方法了!helm命令行工具可以卸载了 😸

  • 感觉我做的界面不好看?或者想要把它作为第三方接入?

参见接口文档自行开发。文档地址

技术栈

  • 前端:Vue全家桶,AntD for Vue UI库。

    Helm仓库部分原来使用是React全家桶开发,现已弃用。改成通过代理在Helm官方网站注入脚本的方式。

  • 后端:Gin框架,Xorm操作数据库,k8s crd 和 operator开发

本地开发

  1. 克隆后端代码 git clone https://github.com/cool-sun/cloudApp.git

  2. 设置环境变量参数

    • mysql_user : 数据库用户名(推荐使用root账户,程序启动时会自动创建使用的cloud-app库,并切换连接到该库)
    • mysql_password : 数据库密码
    • mysql_host : 数据库主机
    • mysql_port : 数据库端口(不设置的话则使用3306端口)
    • kube_config: 连接到k8s的config文件地址
    • admin_password:cloud-app账户的密码(程序启动时会创建用户名为cloud-app的账户,密码为该值,不设置的话则为123456默认值)

    (上述操作做完后可以在本地开发运行了,不懂前端的忽略下一条)

  3. 克隆前端代码 git clone https://github.com/cool-sun/cloudApp-front.git

    cd cloudApp-front && npm i && npm run server

TODO

  • 监控k8s事件,并通过websocket发给前端,以便用户更好的了解应用安装情况
  • 首页显示当前用户的概况,包括当前app数量,helm release数量,和CPU,内存,磁盘当前占用量等
  • 应用管理>官方应用 网络设置 添加黑白名单设置
  • 应用管理>官方应用 添加应用详情(包括该app的详细信息,还有用e-chart展示历史的CPU和内存占用情况)
  • 持续优化用户体验
  • 。。。

效果图预览

111.png 222.png 333.png 444.png 555.png api.png

最后如果你在使用cloud-app中遇到了问题,可以加群反馈。或者你也可以加群跟大家一起探讨云原生技术相关的问题

qq.jpg

Similar Resources

A K8s ClusterIP HTTP monitoring library based on eBPF

Owlk8s Seamless RED monitoring of k8s ClusterIP HTTP services. This library provides RED (rate,error,duration) monitoring for all(by default but exclu

Jun 16, 2022

A helm v3 plugin to adopt existing k8s resources into a new generated helm chart

helm-adopt Overview helm-adopt is a helm plugin to adopt existing k8s resources into a new generated helm chart, the idea behind the plugin was inspir

Dec 15, 2022

General Pod Autoscaler(GPA) is a extension for K8s HPA, which can be used not only for serving, also for game.

General Pod Autoscaler(GPA) is a extension for K8s HPA, which can be used not only for serving, also for game.

Introduction General Pod Autoscaler(GPA) is a extension for K8s HPA, which can be used not only for serving, also for game. Features Compatible with a

Aug 19, 2022

Running OpenFaas Pro on Linode K8s (feat. Aiven and Pulumi)

Running OpenFaas Pro on Linode K8s (feat. Aiven and Pulumi) Alex Ellis did a great job, when he wrote a tutorial about Event-driven OpenFaaS with Mana

Apr 26, 2022

The k8s-generic-webhook is a library to simplify the implementation of webhooks for arbitrary customer resources (CR) in the operator-sdk or controller-runtime.

k8s-generic-webhook The k8s-generic-webhook is a library to simplify the implementation of webhooks for arbitrary customer resources (CR) in the opera

Nov 24, 2022

Kubedd – Check migration issues of Kubernetes Objects while K8s upgrade

Kubedd – Check migration issues of Kubernetes Objects while K8s upgrade

Dec 19, 2022

Converts your k8s YAML to a cdk8s Api Object.

kube2cdk8s Converts your k8s YAML to a cdk8s Api Object. Uses Pulumi's kube2pulumi as a base. Dependencies 1. pulumi cli 2. pulumi kubernetes provider

Oct 18, 2022

quick debug program running in the k8s pod

quick debug program running in the k8s pod

quick-debug English | 中文 What Problem To Solve As the k8s becomes more and more popular, most projects are deployed in k8s, and so is the development

Apr 1, 2022

This project for solving the problem of chaincode being free from k8s control

This project for solving the problem of chaincode being free from k8s control

Peitho - Hyperledger Fabric chaincode Cloud-native managed system The chaincode of Hyperledger Fabric can be handed over to k8s for management, which

Aug 14, 2022
Comments
  • You should renew you K8s admin config, because the old config was leaked.

    You should renew you K8s admin config, because the old config was leaked.

    You should renew you K8s admin config, because the old config was leaked.

    https://github.com/cool-sun/cloudApp/blob/783cf5e25ba827f8bedd11f45ca10b8d2f628333/config

K8s-cinder-csi-plugin - K8s Pod Use Openstack Cinder Volume

k8s-cinder-csi-plugin K8s Pod Use Openstack Cinder Volume openstack volume list

Jul 18, 2022
K8s-ingress-health-bot - A K8s Ingress Health Bot is a lightweight application to check the health of the ingress endpoints for a given kubernetes namespace.

k8s-ingress-health-bot A K8s Ingress Health Bot is a lightweight application to check the health of qualified ingress endpoints for a given kubernetes

Jan 2, 2022
K8s-go-structs - All k8s API Go structs

k8s-api go types Why? Its nice to have it all in a single package. . |-- pkg |

Jul 17, 2022
k8s-image-swapper Mirror images into your own registry and swap image references automatically.
k8s-image-swapper Mirror images into your own registry and swap image references automatically.

k8s-image-swapper Mirror images into your own registry and swap image references automatically. k8s-image-swapper is a mutating webhook for Kubernetes

Dec 27, 2022
top for k8s
top for k8s

ktop A visualized monitoring dashboard for Kubernetes. kubectl also has top subcommand, but it is not able to: Watch usages regularly for Pod/Node Com

Aug 29, 2022
:recycle: Now you can easily rollback to previous deployed images whatever you want on k8s environment

EasyRollback EasyRollback is aim to easy rollback to previous images that deployed on k8s environment Installation You should have go installation fir

Dec 24, 2022
go-zero 从零到 k8s 部署

启动: 注意事项: dockerfile 文件配置了 LOCAL_HOST 环境变量 1、项目目录下执行 ./docker.sh 脚本生成 rpc服务docker镜像 ./docker.sh 2、docker-compose-db 创建 mysql redis etcd 容器 执行命令

Dec 7, 2022
Kilo is a multi-cloud network overlay built on WireGuard and designed for Kubernetes (k8s + wg = kg)

Kilo Kilo is a multi-cloud network overlay built on WireGuard and designed for Kubernetes. Overview Kilo connects nodes in a cluster by providing an e

Jan 1, 2023
A k8s vault webhook is a Kubernetes webhook that can inject secrets into Kubernetes resources by connecting to multiple secret managers
A k8s vault webhook is a Kubernetes webhook that can inject secrets into Kubernetes resources by connecting to multiple secret managers

k8s-vault-webhook is a Kubernetes admission webhook which listen for the events related to Kubernetes resources for injecting secret directly from sec

Oct 15, 2022
A controller to create K8s Ingresses for Openshift routes.

route-to-ingress-operator A controller to create corresponding ingress.networking.k8s.io/v1 resources for route.openshift.io/v1 TODO int port string p

Jan 7, 2022