-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeployment.yaml
53 lines (53 loc) · 1.11 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
49
50
51
52
53
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: echo-service
labels:
app: echo-service
spec:
replicas: 3
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
minReadySeconds: 5
template:
metadata:
labels:
app: echo-service
spec:
containers:
- name: echo-service
image: your-host.azurecr.io/echo-service:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
resources:
limits:
memory: 4Gi
volumeMounts:
- name: configmap-volume
mountPath: /etc/config
imagePullSecrets:
- name: acr-auth
volumes:
- name: configmap-volume
configMap:
name: "special-config"
---
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: echo-service-autoscaler
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: echo-service
minReplicas: 3
maxReplicas: 5
metrics:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 40