对齐文件规范

This commit is contained in:
2026-03-27 16:58:41 +08:00
parent 231b6713c4
commit 31709425e2
235 changed files with 5433 additions and 2850 deletions

View File

@@ -0,0 +1,44 @@
# docs/05-02-onenav首页面板.md — 修改 Endpoints IP 与 Ingress host
apiVersion: v1 # Service/Endpoints 使用的核心 API 版本
kind: Service # 资源类型Service为外部后端提供集群内服务名
metadata: # Service 元信息
name: onenav-external # Service 名称(与 Endpoints 同名以进行绑定)
namespace: default # 命名空间
spec: # Service 规格
ports: # 端口映射列表
- name: http # 端口名称
port: 80 # Service 对内暴露端口
targetPort: 7070 # 目标端口(与 Endpoints 端口对应)
---
apiVersion: v1 # Endpoints 使用的核心 API 版本
kind: Endpoints # 资源类型:手工定义后端地址
metadata: # Endpoints 元信息
name: onenav-external # 必须与 Service 同名Service 才会路由到这些地址
namespace: default # 命名空间
subsets: # 后端地址与端口集合
- addresses: # 地址列表
- ip: 192.168.2.22 # 实际后端主机 IP按环境修改
ports: # 端口列表
- port: 7070 # 后端服务真实端口
name: http # 端口名称(与 Service 端口名保持一致更清晰)
---
apiVersion: networking.k8s.io/v1 # Ingress API 版本
kind: Ingress # 资源类型:入口路由
metadata: # Ingress 元信息
name: onenav # Ingress 名称
namespace: default # 命名空间
annotations: # 控制器注解
traefik.ingress.kubernetes.io/router.entrypoints: web # 使用 Traefik 的 web(HTTP) 入口
spec: # Ingress 规则
rules: # 规则列表
- host: onenav.example.com # 访问域名(按环境修改)
http: # HTTP 规则
paths: # 路径列表
- path: / # 匹配根路径
pathType: Prefix # 前缀匹配
backend: # 后端目标
service: # 转发到 Service
name: onenav-external # 后端 Service 名称
port: # 后端端口
number: 80 # 端口号