-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkube.yaml
61 lines (61 loc) · 1.16 KB
/
kube.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
apiVersion: apps/v1beta2 # for versions before 1.8.0 use apps/v1beta1
kind: Deployment
metadata:
name: vnu
spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
minReadySeconds: 60
selector:
matchLabels:
app: vnu
replicas: 1 # tells deployment to run 2 pods matching the template
template: # create pods using pod definition in this template
metadata:
labels:
app: vnu
spec:
containers:
- name: vnu
image: gcr.io/passmarked/vnu:latest
resources:
requests:
memory: "64Mi"
limits:
memory: "512Mi"
ports:
- containerPort: 80
env:
- name: PORT
value: "80"
---
apiVersion: v1
kind: Service
metadata:
name: vnu
labels:
app: vnu
spec:
type: LoadBalancer
ports:
- port: 80
protocol: TCP
selector:
app: vnu
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: vnu
namespace: default
spec:
scaleTargetRef:
apiVersion: apps/v1beta1
kind: Deployment
name: vnu
minReplicas: 1
maxReplicas: 10
targetCPUUtilizationPercentage: 20