Skip to content

Instantly share code, notes, and snippets.

@shawnho1018
Last active May 5, 2019 00:27
Show Gist options
  • Save shawnho1018/d7a3ef65794d617005bcafe3ac5d269a to your computer and use it in GitHub Desktop.
Save shawnho1018/d7a3ef65794d617005bcafe3ac5d269a to your computer and use it in GitHub Desktop.
Contour-Example-Blue-Green
apiVersion: contour.heptio.com/v1beta1
kind: IngressRoute
metadata:
name: root-blog
namespace: default
spec:
virtualhost:
fqdn: test.syspks.com
#tls:
#secretName: containersteve-com
routes:
- match: /
delegate:
name: blue #將服務委任給後端Blue IngressRoute
namespace: default
---
apiVersion: contour.heptio.com/v1beta1
kind: IngressRoute
metadata:
name: grey
namespace: default
spec:
routes:
- match: /
services:
- name: nginx-svc-v1
port: 80
weight: 50
- name: nginx-svc-v2
port: 80
weight: 50
---
apiVersion: contour.heptio.com/v1beta1
kind: IngressRoute
metadata:
name: blue
namespace: default
spec:
routes:
- match: /
services:
- name: nginx-svc-v1
port: 80
---
apiVersion: contour.heptio.com/v1beta1
kind: IngressRoute
metadata:
name: green
namespace: default
spec:
routes:
- match: /
services:
- name: nginx-svc-v2
port: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment