# krm-frontend **Repository Path**: dawn_chuang/krm-frontend ## Basic Information - **Project Name**: krm-frontend - **Description**: k8s可视化前端项目 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2024-10-06 - **Last Updated**: 2025-05-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 基本依赖安装 ```shell npm install pinia axios vue-router@4 element-plus @element-plus/icons-vue less --save # 代码格式化库 npm install js-yaml codemirror vue-codemirror @codemirror/language @codemirror/legacy-modes --save # web ssh终端库 npm install xterm xterm-addon-fit xterm-addon-attach --save # 网络可视化库 npm install vis-network --save # 可视化图表库 # 解决报错:Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive. See # 需要安装 npm install -S default-passive-events npm install echarts --save # 图标库 npm install @vicons/fluent @vicons/ionicons4 @vicons/ionicons5 @vicons/antd @vicons/material @vicons/fa @vicons/tabler @vicons/carbon @vicons/utils --save ``` # 部署 ``` npm run build ``` # nginx配置 ```nginx server { listen 80; listen [::]:80; server_name localhost; #access_log /var/log/nginx/host.access.log main; location / { root /etc/nginx/html; } location /api { proxy_pass http://kubeui-backend:8080/api; proxy_set_header Host $http_host; proxy_http_version 1.1; proxy_connect_timeout 5s; proxy_read_timeout 60s; proxy_send_timeout 30s; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "$connection_upgrade"; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /etc/nginx/html; } } ``` # DOCKER镜像 ```dockerfile FROM registry.cn-shanghai.aliyuncs.com/rushbi/tengine-vts:1.1 COPY ./dist /etc/nginx/html COPY ./default.conf /etc/nginx/conf.d/ ``` # K8S部署yaml ```yaml cat<