新增 CORS 的 IngressRoute、Service 和 Endpoints 配置

This commit is contained in:
2026-02-05 23:42:49 +08:00
parent 62a65b5622
commit fc1ff34c10

View File

@@ -0,0 +1,45 @@
---
# CORS - cors.kevisual.cn
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: cors-https
namespace: default
spec:
entryPoints:
- websecure
routes:
- match: Host(`cors.kevisual.cn`)
kind: Rule
services:
- name: cors-external
port: 11111
tls:
certResolver: letsencrypt
---
# CORS 服务 (端口 11111, 本地)
apiVersion: v1
kind: Service
metadata:
name: cors-external
namespace: default
spec:
type: ClusterIP
ports:
- port: 11111
targetPort: 11111
protocol: TCP
name: http
---
apiVersion: v1
kind: Endpoints
metadata:
name: cors-external
namespace: default
subsets:
- addresses:
- ip: 118.196.32.29
ports:
- port: 11111
name: http