-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment.yaml
49 lines (48 loc) · 1.21 KB
/
deployment.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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: product-service-h2
name: product-service-h2
namespace: default
spec:
progressDeadlineSeconds: 600
replicas: 1
minReadySeconds: 45 # when a new deployment applied, it waits pod ready+45seconds for application up!
selector:
matchLabels:
app: product-service-h2
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template: #pod template
metadata:
labels:
app: product-service-h2
spec:
containers:
- image: gcr.io/sandbox-236618/product-service-h2:0.0.1-SNAPSHOT
imagePullPolicy: IfNotPresent #IfNotPresent, Always
name: product-service-h2
resources: {}
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: product-service-h2
namespace: default
spec:
maxReplicas: 10
minReplicas: 1
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: Deployment
name: product-service-h2
targetCPUUtilizationPercentage: 70