-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.yaml
54 lines (52 loc) · 1019 Bytes
/
deploy.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: geolocation-service
spec:
selector:
matchLabels:
app: geolocation-service
replicas: 1
template:
metadata:
labels:
app: geolocation-service
spec:
containers:
- name: geolocation-service
image: <X>
ports:
- containerPort: 8080
resources:
requests:
cpu: 300m
envFrom:
- secretRef:
name: geolocation-dynamodb-secrets
---
apiVersion: v1
kind: Service
metadata:
name: geolocation-service
spec:
selector:
app: geolocation-service
ports:
- name: http
port: 8080
targetPort: 8080
protocol: TCP
type: ClusterIP
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: geolocation-service
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: geolocation-service
minReplicas: 1
maxReplicas: 2
targetCPUUtilizationPercentage: 50