luksa/kubernetes-in-action

Ch.8 Downward Pod not creating

JaydeepUniverse opened this issue · 8 comments

I'm on ch.8 first pod creation for downward api and it's giving me error as below:

Failed create pod sandbox: rpc error: code = Unknown desc = failed to start sandbox container for pod "downward": Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"\"": unknown

Failed create pod sandbox: rpc error: code = Unknown desc = failed to start sandbox container for pod "downward": Error response from daemon: OCI runtime create failed: runc did not terminate sucessfully: unknown

Failed create pod sandbox: rpc error: code = Unknown desc = failed to start sandbox container for pod "downward": Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"read init-p: connection reset by peer\"": unknown

I've tried to create normal other pod which is creating fine without any issue.

Could you please advise on this error, Thanks.

I've recreated same pod without cpu and memory allocation options, and that had worked fine. I think it would related to AKS cluster VMScaleSet VM, I'll check that separately, hence this issue can be closed.

This fixed mine also on GCP, thank you @JaydeepUniverse

It works for me too, thank you @JaydeepUniverse

Hi. It turns out the memory limit is too tight. Just increasing the limit to 10Mi is enough to make the pod start immediately.

git diff downward-api-env.yaml
diff --git a/Chapter08/downward-api-env.yaml b/Chapter08/downward-api-env.yaml
index 5a2d8c4..609a050 100644
--- a/Chapter08/downward-api-env.yaml
+++ b/Chapter08/downward-api-env.yaml
@@ -13,7 +13,7 @@ spec:
         memory: 100Ki
       limits:
         cpu: 100m
-        memory: 4Mi
+        memory: 10Mi
     env:
     - name: POD_NAME
       valueFrom:

Yes... Thank you, the memory is too tight ..thanks Deenen. But the log and event does not show anything about !

Didn't work with 10Mi in minikube. Remove all resource options, it worked well. thanks @JaydeepUniverse

Yes indeed in minikube even with 15Mi it doesn't work, i remove the resources

The memory limit is set to 10 megabytes and it can run just a few more minutes.