56 lines
1.7 KiB
YAML
56 lines
1.7 KiB
YAML
# docs/05-09-openclaw-web-小游戏网页平台.md — 按需修改 Ingress host/镜像
|
|
apiVersion: apps/v1 # Deployment API 版本
|
|
kind: Deployment # 部署
|
|
metadata: # 元信息
|
|
name: openclaw-web # 名称
|
|
namespace: default # 命名空间
|
|
spec: # 规格
|
|
replicas: 1 # 副本数
|
|
selector: # 选择器
|
|
matchLabels: # 匹配标签
|
|
app: openclaw-web # 标签
|
|
template: # Pod 模板
|
|
metadata: # Pod 元信息
|
|
labels: # Pod 标签
|
|
app: openclaw-web # 标签
|
|
spec: # Pod 规格
|
|
containers: # 容器列表
|
|
- name: openclaw-web # 容器名
|
|
image: ghcr.io/your/openclaw-web:latest # 镜像(按环境修改)
|
|
ports: # 容器端口
|
|
- containerPort: 80 # Web 端口
|
|
---
|
|
apiVersion: v1 # Service API 版本
|
|
kind: Service # Service
|
|
metadata: # 元信息
|
|
name: openclaw-web # Service 名称
|
|
namespace: default # 命名空间
|
|
spec: # 规格
|
|
selector: # 选择后端 Pod
|
|
app: openclaw-web # 标签
|
|
ports: # 端口
|
|
- name: http # 名称
|
|
port: 80 # Service 端口
|
|
targetPort: 80 # Pod 端口
|
|
---
|
|
apiVersion: networking.k8s.io/v1 # Ingress API 版本
|
|
kind: Ingress # Ingress
|
|
metadata: # 元信息
|
|
name: openclaw-web # 名称
|
|
namespace: default # 命名空间
|
|
annotations: # 注解
|
|
traefik.ingress.kubernetes.io/router.entrypoints: web # Traefik entrypoint
|
|
spec: # 规格
|
|
rules: # 规则
|
|
- host: openclaw.example.com # 域名(按环境修改)
|
|
http: # HTTP
|
|
paths: # 路径
|
|
- path: / # 根路径
|
|
pathType: Prefix # 前缀匹配
|
|
backend: # 后端
|
|
service: # Service
|
|
name: openclaw-web # 后端 service
|
|
port: # 端口
|
|
number: 80 # 端口号
|
|
|