对齐文件规范
This commit is contained in:
43
ansible/files/05-07/openclaw-proxy.yaml
Normal file
43
ansible/files/05-07/openclaw-proxy.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
# docs/05-07-openclaw应用部署.md — 修改 IP / host
|
||||
apiVersion: v1 # Service/Endpoints 使用的核心 API 版本
|
||||
kind: Service # 资源类型:Service(对外部后端提供集群内服务名)
|
||||
metadata: # Service 元信息
|
||||
name: openclaw-external # Service 名称(需与 Endpoints 同名)
|
||||
namespace: default # 命名空间
|
||||
spec: # Service 规格
|
||||
ports: # 端口映射列表
|
||||
- name: http # 端口名称
|
||||
port: 80 # Service 暴露端口
|
||||
targetPort: 18789 # 目标端口(与 Endpoints 端口对应)
|
||||
---
|
||||
apiVersion: v1 # Endpoints 使用的核心 API 版本
|
||||
kind: Endpoints # 资源类型:手工定义后端地址
|
||||
metadata: # Endpoints 元信息
|
||||
name: openclaw-external # 必须与 Service 同名才能绑定
|
||||
namespace: default # 命名空间
|
||||
subsets: # 后端地址与端口集合
|
||||
- addresses: # 地址列表
|
||||
- ip: 192.168.2.70 # 外部后端 IP(按环境修改)
|
||||
ports: # 端口列表
|
||||
- port: 18789 # 外部后端真实端口
|
||||
name: http # 端口名
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1 # Ingress API 版本
|
||||
kind: Ingress # 入口资源:域名/路径转发
|
||||
metadata: # Ingress 元信息
|
||||
name: openclaw # Ingress 名称
|
||||
namespace: default # 命名空间
|
||||
annotations: # Traefik 注解
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: web # 使用 web(HTTP) 入口
|
||||
spec: # Ingress 规则
|
||||
rules: # 规则列表
|
||||
- host: openclaw.example.com # 访问域名(按环境修改)
|
||||
http: # HTTP 规则
|
||||
paths: # 路径列表
|
||||
- path: / # 根路径
|
||||
pathType: Prefix # 前缀匹配
|
||||
backend: # 后端目标
|
||||
service: # 后端 Service
|
||||
name: openclaw-external # Service 名称
|
||||
port: # Service 端口
|
||||
number: 80 # 端口号
|
||||
Reference in New Issue
Block a user