forked from GoogleCloudPlatform/gke-networking-recipes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cluster-blue-app.yaml
72 lines (72 loc) · 1.26 KB
/
cluster-blue-app.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
kind: Namespace
apiVersion: v1
metadata:
name: mcgi-bg
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: sample-app
namespace: mcgi-bg
spec:
replicas: 2
selector:
matchLabels:
app: sample-app
version: v1
template:
metadata:
labels:
app: sample-app
version: v1
spec:
containers:
- name: whereami
image: us-docker.pkg.dev/google-samples/containers/gke/whereami:v1.2.20
ports:
- containerPort: 8080
env:
- name: METADATA
value: "sample-app-blue"
---
# used for explicit load balancing
apiVersion: v1
kind: Service
metadata:
name: sample-app-blue
namespace: mcgi-bg
spec:
selector:
app: sample-app
version: v1
ports:
- port: 8080
targetPort: 8080
---
# used for explicit load balancing
kind: ServiceExport
apiVersion: net.gke.io/v1
metadata:
name: sample-app-blue
namespace: mcgi-bg
---
# used for implicit load balancing
apiVersion: v1
kind: Service
metadata:
name: sample-app
namespace: mcgi-bg
spec:
selector:
app: sample-app
version: v1
ports:
- port: 8080
targetPort: 8080
---
# used for implicit load balancing
kind: ServiceExport
apiVersion: net.gke.io/v1
metadata:
name: sample-app
namespace: mcgi-bg