-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s.yaml
98 lines (92 loc) · 1.84 KB
/
k8s.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: id
labels:
app: id
spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
replicas: 1
selector:
matchLabels:
app: id
template:
metadata:
labels:
app: id
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- id
topologyKey: kubernetes.io/hostname
containers:
- name: id
image: us.gcr.io/taeho-io-220708/id:${CIRCLE_SHA1}
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:80"]
initialDelaySeconds: 10
livenessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:80"]
initialDelaySeconds: 15
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: id-hpa
labels:
app: id
spec:
scaleTargetRef:
kind: Deployment
name: id
apiVersion: apps/v1beta1
minReplicas: 1
maxReplicas: 5
targetCPUUtilizationPercentage: 80
---
apiVersion: v1
kind: Service
metadata:
name: id
labels:
app: id
spec:
ports:
- port: 80
name: grpc
selector:
app: id
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: id-route-public-grpc-no-auth
spec:
hosts:
- api.taeho.io
gateways:
- public-gateway
http:
- match:
- uri:
prefix: /id.Id/
route:
- destination:
host: id
port:
number: 80