Hi All , Is there any way to debug the issue if the pod is stuck in "ContainerCr . . .

Abdul:
Hi All ,
Is there any way to debug the issue if the pod is stuck in “ContainerCreating” state ?

I’m having a resource quota as below :
Name: awesome-quota
Namespace: quota
Resource Used Hard
-------- ---- ----
limits.cpu 0 4
limits.memory 0 4096m
pods 0 2
requests.cpu 0 1
requests.memory 0 1024m

When I’m trying to create a pod using below config , its getting stuck on “ContainerCreating”:

apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: nginx
name: nginx
namespace: quota
spec:
containers:
- image: nginx:1.18.0
name: nginx
resources:
limits:
cpu: "1"
memory: "1024m"
requests:
cpu: "0.5"
memory: "512m"
dnsPolicy: ClusterFirst
restartPolicy: Never
status: {}

Sudheer M:
Did you try

kubectl logs pod <<pod-name>> -n <<namespace>>?

I am not able to reproduce, so please give it a shot.

you can try log tail as well

kubectl logs -f pod <<pod-name>> -n <<namespace>>?

Abdul:
actually in this state logs are not available …, , tried again and its again stuck from last 25minutes…

$ k get pods -n quota
NAME READY STATUS RESTARTS AGE
nginx 0/1 ContainerCreating 0 25m

Abdul:
$ k logs nginx -n quota
Error from server (BadRequest): container “nginx” in pod “nginx” is waiting to start: ContainerCreating

Sudheer M:
I tried to reproduce and I noticed error in events by using

kubectl describe pod nginx -n quota

Sudheer M:
Type Reason Age From Message


Normal Scheduled 81s default-scheduler Successfully assigned quota/nginx to controlplane
Normal SandboxChanged 69s (x12 over 80s) kubelet Pod sandbox changed, it will be killed and re-created.
Warning FailedCreatePodSandBox 68s (x13 over 80s) kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to start sandbox container for pod “nginx”: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:352: getting the final child’s pid from pipe caused: EOF: unknown

Abdul:
Thanks for trying , I’m still not able to figure-out the root cause from the above error …