deployment fails to recreate a successful replicaset

本秂侑毒 提交于 2020-12-06 16:46:50

问题


We are using Kubernetes 1.8 to deploy our software in a cloud provider. Frequently, when deploying a specific pod-template, the deployment fails to create a successful replicaset and no instance is created. I am not able to find a better description than kubectl describe deploy.

  Type           Status  Reason
  ----           ------  ------
  Available      False   MinimumReplicasUnavailable
  Progressing    False   ProgressDeadlineExceeded
OldReplicaSets:  <none>
NewReplicaSet:   <none>
Events:
  Type    Reason             Age               From                   Message
  ----    ------             ----              ----                   -------
  Normal  ScalingReplicaSet  21m (x3 over 2d)  deployment-controller  Scaled up replica set cbase-d-6bbfbdb5dc to 1
  Normal  ScalingReplicaSet  19m (x3 over 2d)  deployment-controller  Scaled down replica set cbase-d-6bbfbdb5dc to 0

回答1:


I got a similar error like yours yesterday and finally figured out that I could get error message from the pod corresponds with the deployment by using command kubectl get pod YOUR_POD_NAME -o yaml. You can check the status and error message there.




回答2:


While this might not be always true but a likely reason could be the unavailability of resources. Try increasing the resources (cpu+memory) allocated to the cluster.

This was exactly the error I got and increasing allocated resources fixed the issue (on GKE).



来源:https://stackoverflow.com/questions/48954357/deployment-fails-to-recreate-a-successful-replicaset

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!