Set Limits for Resources in Kubernetes for pod failed

hi all,
This task is assigned to me today but every time the pod failed to be running and crashed, I tried to check the pod and got this error
here is my code:

kind: Pod
metadata:
  name: httpd-pod
spec:
  containers:
  - name: httpd-container
    image: httpd:latest
    resources:
      requests:
        memory: "15Mi"
        cpu: "1"  
      limits:
        memory: "20Mi"
        cpu: "2"

2 Likes

Hey, try to keep cpu value without quotes i.e cpu: 2

thanks @Inderpreet but I got the same issue

@Ayman any help plz

IMO, httpd requires more memory than 20Mi. Try to increase into 25Mi then it should work.

@DTsg the issue is with the CPU limits not memory limits

Hello, @Sabreen
Please be patience. Our KKE team members are investigating.

i m also having the same issue @Tej-Singh-Rana @Ayman

i m also having the same issue @Tej-Singh-Rana @Ayman

We have fixed issue with this lab, can you please try again to see if it works.

1 Like

@Inderpreet hi inderpreet, it is working fine now and I completed it

1 Like

@Inderpreet What is the issue and what is the fix. Pls help us with the steps

Hi @sreemanthena

There was an issue from back-end earlier with this lab, but now its fixed so you should be able to resolve it with a valid solution.

@Inderpreet It’s not fixed yet. I am facing the same issue.