Setting CPU and RAM Limit
apiVersion: v1
kind: Pod
metadata:
name: memory-demo
namespace: mem-example
spec:
containers:
- name: memory-demo-ctr
image: polinux/stress
resources:
limits:
memory: "200Mi"
requests:
memory: "100Mi"
command: ["stress"]
args: ["--vm", "1", "--vm-bytes", "150M", "--vm-hang", "1"]
correctly injected
"requests":{
"memory": "64Mi",
"cpu": "250m"
},
"limits":{
"memory": "256Mi",
"cpu": "1000m"
}