Reputation: 1430
While deploying a new deployment to our GKE cluster, the pod is created but is failing with the following error:
Failed create pod sandbox: rpc error: code = Unknown desc = failed to create containerd task: OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:319: getting the final child's pid from pipe caused \"read init-p: connection reset by peer\"": unknown
The cluster is not loaded at all, and there is enough free disk, memory and CPU.
No other issue was seen in the pod/cluster logs.
Upvotes: 10
Views: 13390
Reputation: 3551
The RAM resource is measured in bytes. You can express RAM as a plain integer or a fixed-point integer with one of these suffixes : E, P, T, G, M, K, Ei, Pi, Ti, Gi, Mi, Ki.
Refer Memory Meaning on Kubernetes Docs
CPU resources are defined in millicores. Fractional values are allowed and you can use the suffix m to mean mili when defining CPU limits. For example 100m cpu is 100 milicpu, and is the same as 0.1 cpu.
Example : If your container needs one full cores to run, you would put the value “1000m”. If your container only needs ¼ of a core, you would put a value of “250m”.
Upvotes: 1
Reputation: 1430
The issue was eventually in the deployment YAML.
If you encounter a similar issue, check your resources section and verify it has to correct syntax which can be found here: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
In my case, the issue was in the memory value:
Working example (Note the Mi):
resources:
limits:
cpu: 500m
memory: 256Mi
requests:
cpu: 5m
memory: 256Mi
The initial resources definition (BAD SYNTAX):
resources:
limits:
cpu: 500m
memory: 256m
requests:
cpu: 5m
memory: 256m
I hope that it'll help other community members in the future, since it took me a decent amount of time to find the root cause in my case...
Upvotes: 26