This commit is contained in:
2025-11-26 15:44:15 +08:00
parent 1cd698ed64
commit 2418891634
42 changed files with 3715 additions and 5 deletions

View File

@@ -0,0 +1,474 @@
---
# 外部服务配置 - Services with Endpoints
# tags: kubernetes, services, external-services, nginx-migration, endpoints
# description: 将外部运行的服务映射为 Kubernetes Services供 Traefik IngressRoute 使用
# title: 外部服务 Kubernetes Service 配置
# createdAt: 2025-11-26
---
# Blinko 服务 (端口 3111, IP: 10.0.32.6)
apiVersion: v1
kind: Service
metadata:
name: blinko-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 3111
targetPort: 3111
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: blinko-external
namespace: default
subsets:
- addresses:
- ip: 10.0.32.6
ports:
- port: 3111
name: http
---
# Chat 服务 (端口 3000, 本地)
apiVersion: v1
kind: Service
metadata:
name: chat-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 3000
targetPort: 3000
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: chat-external
namespace: default
subsets:
- addresses:
- ip: 121.4.112.18
ports:
- port: 3000
name: http
---
# Kevisual 服务 (端口 3005, 本地)
apiVersion: v1
kind: Service
metadata:
name: kevisual-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 3005
targetPort: 3005
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: kevisual-external
namespace: default
subsets:
- addresses:
- ip: 121.4.112.18
ports:
- port: 3005
name: http
---
# WWW 服务 (端口 3005, 本地) - 与 kevisual 相同
apiVersion: v1
kind: Service
metadata:
name: www-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 3005
targetPort: 3005
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: www-external
namespace: default
subsets:
- addresses:
- ip: 121.4.112.18
ports:
- port: 3005
name: http
---
# Immich 服务 (端口 2283, 本地)
apiVersion: v1
kind: Service
metadata:
name: immich-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 2283
targetPort: 2283
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: immich-external
namespace: default
subsets:
- addresses:
- ip: 121.4.112.18
ports:
- port: 2283
name: http
---
# Cloud 服务 (端口 5212, 本地)
apiVersion: v1
kind: Service
metadata:
name: cloud-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 5212
targetPort: 5212
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: cloud-external
namespace: default
subsets:
- addresses:
- ip: 121.4.112.18
ports:
- port: 5212
name: http
---
# Docmost 服务 (端口 3011, 本地)
apiVersion: v1
kind: Service
metadata:
name: docmost-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 3011
targetPort: 3011
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: docmost-external
namespace: default
subsets:
- addresses:
- ip: 121.4.112.18
ports:
- port: 3011
name: http
---
# Drawio 服务 (端口 13000, 本地)
apiVersion: v1
kind: Service
metadata:
name: drawio-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 13000
targetPort: 13000
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: drawio-external
namespace: default
subsets:
- addresses:
- ip: 121.4.112.18
ports:
- port: 13000
name: http
---
# Minio 服务 (端口 9000, 本地)
apiVersion: v1
kind: Service
metadata:
name: minio-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 9000
targetPort: 9000
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: minio-external
namespace: default
subsets:
- addresses:
- ip: 121.4.112.18
ports:
- port: 9000
name: http
---
# NPM (Verdaccio) 服务 (端口 30001, IP: 10.0.32.6)
apiVersion: v1
kind: Service
metadata:
name: npm-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 30001
targetPort: 30001
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: npm-external
namespace: default
subsets:
- addresses:
- ip: 10.0.32.6
ports:
- port: 30001
name: http
---
# Gist 服务 (端口 6157, 本地)
apiVersion: v1
kind: Service
metadata:
name: gist-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 6157
targetPort: 6157
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: gist-external
namespace: default
subsets:
- addresses:
- ip: 121.4.112.18
ports:
- port: 6157
name: http
---
# Webdav 服务 (端口 6060, 本地)
apiVersion: v1
kind: Service
metadata:
name: webdav-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 6060
targetPort: 6060
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: webdav-external
namespace: default
subsets:
- addresses:
- ip: 121.4.112.18
ports:
- port: 6060
name: http
---
# ESM 服务 (端口 12000, 本地)
apiVersion: v1
kind: Service
metadata:
name: esm-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 12000
targetPort: 12000
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: esm-external
namespace: default
subsets:
- addresses:
- ip: 121.4.112.18
ports:
- port: 12000
name: http
---
# Umami 服务 (端口 4004, 本地)
apiVersion: v1
kind: Service
metadata:
name: umami-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 4004
targetPort: 4004
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: umami-external
namespace: default
subsets:
- addresses:
- ip: 121.4.112.18
ports:
- port: 4004
name: http
---
# PWD 服务 (端口 8180, 本地)
apiVersion: v1
kind: Service
metadata:
name: pwd-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 8180
targetPort: 8180
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: pwd-external
namespace: default
subsets:
- addresses:
- ip: 121.4.112.18
ports:
- port: 8180
name: http
---
# Meilisearch 服务 (端口 7700, 本地)
apiVersion: v1
kind: Service
metadata:
name: meilisearch-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 7700
targetPort: 7700
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: meilisearch-external
namespace: default
subsets:
- addresses:
- ip: 121.4.112.18
ports:
- port: 7700
name: http
---
# Memos 服务 (端口 8181, IP: 10.0.32.6)
apiVersion: v1
kind: Service
metadata:
name: memos-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 8181
targetPort: 8181
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: memos-external
namespace: default
subsets:
- addresses:
- ip: 10.0.32.6
ports:
- port: 8181
name: http
---
# Gitea 服务 (端口 3000, IP: 10.0.32.6)
apiVersion: v1
kind: Service
metadata:
name: gitea-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 3000
targetPort: 3000
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: gitea-external
namespace: default
subsets:
- addresses:
- ip: 10.0.32.6
ports:
- port: 3000
name: http

View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: verdaccio-service
spec:
selector:
machine: library
ports:
- protocol: TCP
port: 4873
targetPort: 4873
nodePort: 30001 # 可选,指定端口范围 30000-32767
type: NodePort