| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- # �Ingress:backend 指� stable Service gateway
- # ç�°åº¦ï¼šå�¦å»?Ingress 或使用å�Œ host ä¸?canary 注解指å�‘ gateway-canary(二选一,æ¤å¤„为「独ç«?canary Ingressã€�示例)
- ---
- apiVersion: networking.k8s.io/v1
- kind: Ingress
- metadata:
- name: gateway
- namespace: alien-produ
- annotations:
- kubernetes.io/ingress.class: nginx
- spec:
- rules:
- - host: api-produ.example.com
- http:
- paths:
- - path: /
- pathType: Prefix
- backend:
- service:
- name: gateway
- port:
- number: 8000
- ---
- apiVersion: networking.k8s.io/v1
- kind: Ingress
- metadata:
- name: gateway-canary
- namespace: alien-produ
- annotations:
- kubernetes.io/ingress.class: nginx
- nginx.ingress.kubernetes.io/canary: "true"
- nginx.ingress.kubernetes.io/canary-weight: "0"
- # 与主 Ingress 相� host,Nginx 按��分�到�Ingress �backend
- spec:
- rules:
- - host: api-produ.example.com
- http:
- paths:
- - path: /
- pathType: Prefix
- backend:
- service:
- name: gateway-canary
- port:
- number: 8000
|