OOM in Deploy Haproxy App on Kubernetes task

Hi,

The task says that I must define resource limit for memory with 50Mi but the container does not start as it complains about Out of memory.
What should I do ?

Containers:
  ingress-container-nautilus:
    Container ID:  docker://df1a9f3640b1d4624121dbc3cd2bfaeea2d8ba024898c7d76b8d5ef8f8cbee4b
    Image:         haproxytech/kubernetes-ingress
    Image ID:      docker-pullable://haproxytech/kubernetes-ingress@sha256:5a367da9f1365858526c9f822f88c64a9c3ed9a35ac8d4179a74c19bcfc9f998
    Ports:         80/TCP, 443/TCP, 1024/TCP
    Host Ports:    0/TCP, 0/TCP, 0/TCP
    Args:
      --default-backend-service=haproxy-controller-nautilus/service-backend-nautilus
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       OOMKilled
      Exit Code:    137
      Started:      Fri, 11 Jun 2021 12:26:43 +0000
      Finished:     Fri, 11 Jun 2021 12:26:43 +0000
    Ready:          False
    Restart Count:  10
    Limits:
      cpu:     500m
      memory:  50Mi
    Requests:
      cpu:     500m
      memory:  50Mi

a process gets OOM killed if it tries to use more than the limit. If no limit is set, process can allocate as much as it wants but if there is a memory exhaustion, the only way to regain some free memory is to kill a process.

Please check this to get info about how to assign memory resources to pods and containers
https://kubernetes.io/docs/tasks/configure-pod-container/assign-memory-resource/

thank you for the reply I know this but my question was something else.

kodekloud engineer task requires to set memory limit for a pod which is 50Mi whereas this value is a bit low and the pod does not start.

I think the task must be edited.