Better resource management
This commit is contained in:
parent
6a2d6d713e
commit
684cac8b6f
2 changed files with 12 additions and 2 deletions
|
@ -2,10 +2,11 @@ apiVersion: apps/v1
|
|||
kind: Deployment
|
||||
metadata:
|
||||
name: desteg
|
||||
namespace: desteg
|
||||
labels:
|
||||
app: desteg
|
||||
spec:
|
||||
replicas: 3
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: desteg
|
||||
|
@ -19,11 +20,19 @@ spec:
|
|||
image: dockerhub.kube:5000/desteg:latest
|
||||
ports:
|
||||
- containerPort: 5002
|
||||
resources:
|
||||
limits:
|
||||
cpu: '750m'
|
||||
memory: '4096Mi'
|
||||
requests:
|
||||
cpu: '500m'
|
||||
memory: '2048Mi'
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: desteg
|
||||
namespace: desteg
|
||||
spec:
|
||||
selector:
|
||||
app: desteg
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: desteg-hpa
|
||||
name: desteg
|
||||
namespace: desteg
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
|
|
Loading…
Reference in a new issue