首页 > 解决方案 > Kubernetes ReplicaFailure FailedCreate 但没有事件

问题描述

我在 Kubernetes 中有部署和副本集,但无法创建 pod。我试过了

kubectl describe deployment deployment-name

kubectl describe replicaset replicaset-name

他们都说

Conditions:
  Type             Status  Reason
  ----             ------  ------
  ReplicaFailure   True    FailedCreate
Events:            <none>

我见过的所有故障排除指南都依赖于“事件”部分的信息,但它<none>在我的情况下是这样说的。如何获取更多信息来调试问题?

标签: kuberneteskubernetes-helmkubernetes-pod

解决方案


描述副本集将为您提供导致部署对象失败的错误。

./kubectl describe replicaset <replica-set-name>

示例错误:

  Type     Reason            Age                From                   Message
  ----     ------            ----               ----                   -------
  Normal   SuccessfulCreate  13m                replicaset-controller  Created pod: pod
  Warning  FailedCreate      13m                replicaset-controller  Error creating: pods "pod" is forbidden: exceeded quota: custom-resource-quota, requested: cpu=510m, used: cpu=1630m, limited: cpu=2

推荐阅读