基本框架
This commit is contained in:
74
ansible/files/openclaw/openclaw-k3s-experimental.yaml
Normal file
74
ansible/files/openclaw/openclaw-k3s-experimental.yaml
Normal file
@@ -0,0 +1,74 @@
|
||||
# docs/05-08-openclaw-k3s-实验部署.md — 实验用;替换镜像与域名
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: openclaw
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: openclaw-gateway
|
||||
namespace: openclaw
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: openclaw-gateway
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: openclaw-gateway
|
||||
spec:
|
||||
containers:
|
||||
- name: openclaw-gateway
|
||||
image: registry.local/openclaw:local
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: OPENCLAW_GATEWAY_MODE
|
||||
value: "local"
|
||||
ports:
|
||||
- containerPort: 18789
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /home/node/.openclaw
|
||||
- name: workspace
|
||||
mountPath: /home/node/.openclaw/workspace
|
||||
volumes:
|
||||
- name: config
|
||||
emptyDir: {}
|
||||
- name: workspace
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: openclaw-gateway
|
||||
namespace: openclaw
|
||||
spec:
|
||||
selector:
|
||||
app: openclaw-gateway
|
||||
ports:
|
||||
- port: 18789
|
||||
targetPort: 18789
|
||||
protocol: TCP
|
||||
name: http
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: openclaw-gateway
|
||||
namespace: openclaw
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: web
|
||||
spec:
|
||||
rules:
|
||||
- host: openclaw-k3s.example.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: openclaw-gateway
|
||||
port:
|
||||
number: 18789
|
||||
43
ansible/files/openclaw/openclaw-proxy.yaml
Normal file
43
ansible/files/openclaw/openclaw-proxy.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
# docs/05-07-openclaw应用部署.md — 修改 IP / host
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: openclaw-external
|
||||
namespace: default
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 18789
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Endpoints
|
||||
metadata:
|
||||
name: openclaw-external
|
||||
namespace: default
|
||||
subsets:
|
||||
- addresses:
|
||||
- ip: 192.168.2.70
|
||||
ports:
|
||||
- port: 18789
|
||||
name: http
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: openclaw
|
||||
namespace: default
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: web
|
||||
spec:
|
||||
rules:
|
||||
- host: openclaw.example.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: openclaw-external
|
||||
port:
|
||||
number: 80
|
||||
Reference in New Issue
Block a user