如何在不删除部署的情况下删除处于 Pending 状态的 Kubernetes Pod?
我运行
kubectl rollout restart deployment <my-deployment-name>
是为了重新启动在部署下启动的单个 Pod。
NAME READY STATUS RESTARTS AGE
<pod-name>-vf24n 1/1 Running 1 7d
<pod-name>-8fgqt 0/1 Pending 0 14m
遗憾的是,我的亲和节点上没有可用资源来执行此操作,因此新创建的 pod 停留在 Pending 状态。
Normal NotTriggerScaleUp 2m57s (x31 over 7m58s) cluster-autoscaler pod didn't trigger scale-up (it wouldn't fit if a new node is added):
Warning FailedScheduling 47s (x9 over 8m) default-scheduler 0/3 nodes are available: 1 Insufficient memory, 2 node(s) didn't match Pod's node affinity/selector.
我想删除待处理的 Pod 或以某种方式恢复推出重新启动操作,而不删除部署。是否可以?
I ran
kubectl rollout restart deployment <my-deployment-name>
in order to restart my single pod, launched under the deployment.
NAME READY STATUS RESTARTS AGE
<pod-name>-vf24n 1/1 Running 1 7d
<pod-name>-8fgqt 0/1 Pending 0 14m
Sadly, I had no available resources on my affinity node to perform this operation, so the new created pod stuck in Pending state.
Normal NotTriggerScaleUp 2m57s (x31 over 7m58s) cluster-autoscaler pod didn't trigger scale-up (it wouldn't fit if a new node is added):
Warning FailedScheduling 47s (x9 over 8m) default-scheduler 0/3 nodes are available: 1 Insufficient memory, 2 node(s) didn't match Pod's node affinity/selector.
I would like to delete the Pending pod or somehow revert the rollout restart operation, without deleting the deployment. Is it possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
kubectl rollout undo deployment/my-deployment-name
将撤消 rolloutkubectl rollout undo deployment/my-deployment-name
will undo a rollout