add HPA to Kubernetes deployment
This commit is contained in:
parent
9869e98346
commit
61c3acf9b2
@ -6,7 +6,6 @@ metadata:
|
||||
annotations:
|
||||
reloader.stakater.com/auto: "true"
|
||||
spec:
|
||||
replicas: 5
|
||||
selector:
|
||||
matchLabels:
|
||||
app: kubernaut
|
||||
|
19
kustomize/app/hpa.yaml
Normal file
19
kustomize/app/hpa.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: kubernaut
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: kubernaut
|
||||
minReplicas: 1
|
||||
maxReplicas: 10
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 50
|
@ -6,4 +6,5 @@ resources:
|
||||
- secret.yaml
|
||||
- configmap.yaml
|
||||
- deployment.yaml
|
||||
- hpa.yaml
|
||||
- services.yaml
|
||||
|
Loading…
x
Reference in New Issue
Block a user