Nginx: Remove CPU limits, make Memory limits same

Setting CPU limits might lead to pods being terminated
during CPU spikes.

Signed-off-by: Mihai Galos <mihaigalos@gmail.com>
This commit is contained in:
Mihai Galos 2023-04-23 18:34:48 +02:00
parent c18126e63f
commit d779dd1c81
No known key found for this signature in database
GPG Key ID: 77BD2B1B87222649
2 changed files with 5 additions and 4 deletions

View File

@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: my-nginx
namespace: nginx
spec:
selector:
matchLabels:
@ -20,8 +21,7 @@ spec:
memory: "128Mi"
cpu: "250m"
limits:
memory: "384Mi"
cpu: "500m"
memory: "128Mi"
ports:
- containerPort: 443
- containerPort: 80
- containerPort: 80

View File

@ -2,6 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: my-nginx
namespace: nginx
labels:
run: my-nginx
spec:
@ -17,4 +18,4 @@ spec:
protocol: TCP
name: https
selector:
run: my-nginx
run: my-nginx