Error creating: pods is forbidden:<pod> failed quota: <namespace>: must specify limits.memory Error creating: pods is forbidden:<pod> failed quota: <namespace>: must specify limits.memory kubernetes kubernetes

Error creating: pods is forbidden:<pod> failed quota: <namespace>: must specify limits.memory


Forbidden Failed quota error comes when any of the containers in the pod does not have limits and requests in the spec and that includes init containers too. Adding limits and requests to all containers should solve the error.


Add something like this under spec section

containers:- name: nsc-core  image: registry.xxx.xxxx.com/xxkl/xxx-xxxx:1.4  resources:    limits:      cpu: "2"      memory: 2000Mi    requests:      cpu: "1"      memory: 1500Mi