Kubernetes 部署失败,在 GKE 中显示“创建 pod 沙箱失败”

hil*_*rat 8 kubernetes google-kubernetes-engine kubernetes-helm

在将新部署部署到我们的 GKE 集群时,pod 已创建但失败并显示以下错误:

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
Run Code Online (Sandbox Code Playgroud)

集群完全没有加载,有足够的空闲磁盘、内存和CPU。

在 pod/cluster 日志中没有发现其他问题。

hil*_*rat 21

问题最终出在部署 YAML 中。

如果您遇到类似问题,请检查您的资源部分并验证它是否具有正确的语法,可以在此处找到:https : //kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/

就我而言,问题出在内存值上:

工作示例(注意 Mi):

resources:
    limits:
      cpu: 500m
      memory: 256Mi
    requests:
      cpu: 5m
      memory: 256Mi
Run Code Online (Sandbox Code Playgroud)

初始资源定义(BAD SYNTAX):

resources:
    limits:
      cpu: 500m
      memory: 256m
    requests:
      cpu: 5m
      memory: 256m
Run Code Online (Sandbox Code Playgroud)

我希望它会在未来帮助其他社区成员,因为我花了相当多的时间来找到我的案例的根本原因......