25 lines
583 B
YAML
25 lines
583 B
YAML
# Ingress 範本 - Traefik
|
|
# 使用方式:將 {{APP_NAME}}、{{HOST}} 替換為實際值
|
|
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{APP_NAME}}-ingress
|
|
labels:
|
|
app: {{APP_NAME}}
|
|
annotations:
|
|
traefik.ingress.kubernetes.io/router.entrypoints: web, websecure
|
|
spec:
|
|
ingressClassName: traefik
|
|
rules:
|
|
- host: {{HOST}}
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{APP_NAME}}-service
|
|
port:
|
|
number: {{PORT|8080}}
|