-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.yaml
51 lines (47 loc) · 905 Bytes
/
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
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: sudoku-solver
namespace: default
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: sudoku-solver
minReplicas: 1
maxReplicas: 20
targetCPUUtilizationPercentage: 80
---
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: sudoku-solver
spec:
selector:
matchLabels:
app: sudoku-solver
replicas: 1
template:
metadata:
labels:
app: sudoku-solver
spec:
containers:
- name: sudoku-solver
image: captaincontainer/sudoku-solver:latest
ports:
- containerPort: 8080
---
kind: Service
apiVersion: v1
metadata:
name: sudoku-solver
spec:
selector:
app: sudoku-solver
ports:
- protocol: TCP
port: 80
targetPort: 8080
loadBalancerIP: $LB_IP
type: LoadBalancer