为什么广告连播状态仍为“待处理"? [英] Why does pod status remain 'PENDING'?

查看:74
本文介绍了为什么广告连播状态仍为“待处理"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我得到的输出:

    [root@ip-10-0-3-103 ec2-user]# kubectl get pod --namespace=migration
    NAME                                          READY   STATUS    RESTARTS   AGE
    clear-nginx-deployment-cc77649fb-j8mzj        0/1     Pending   0          118m
    clear-nginx-deployment-temp-cc77649fb-hxst2   0/1     Pending   0          41s

无法理解json中显示的消息:

Could not understand the message shown in json:

*"status": 
{
        "conditions": [
            {
                "message": "0/1 nodes are available: 1 pod has unbound immediate PersistentVolumeClaims.",

                "reason": "Unschedulable",
                "status": "False",
                "type": "PodScheduled"
            }
        ],
        "phase": "Pending",
        "qosClass": "BestEffort"
}*

如果可以的话,请帮助解决这个问题.较早的关于stackoverflow的问题无法回答我的查询,因为我的消息输出是不同的.

If you could please help to get through this. The earlier question on stackoverflow doesn't answer my query as my message output is different.

推荐答案

这是由于已指示您的Pod声明要声明存储空间,但是,在您的情况下,有可用的存储空间.使用 kubectl get pods< pod-name>检查您的Pod.-o yaml ,然后查看已应用于集群的确切yaml.在其中应该可以看到Pod正在尝试声明PersistentVolume(PV).

This is due to the fact that your Pods have been instructed to claim storage, however, in your case there is storage available. Check your Pods with kubectl get pods <pod-name> -o yaml and look at the exact yaml that has been applied to the cluster. In there you should be able to see that the Pod is trying to claim a PersistentVolume (PV).

要快速创建由 hostPath 支持的PV,请应用以下yaml:

To quickly create a PV backed by a hostPath apply the following yaml:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: stackoverflow-hostpath
  namespace: migration
spec:
  capacity:
    storage: 10Gi
  accessModes:
  - ReadWriteOnce
  hostPath:
    path: "/mnt/data"

Kubernetes将以指数方式尝试再次安排Pod;为了加快速度,请删除您的一个Pod( kubectl delete pods< pod-name> )以立即重新安排它的时间.

Kubernetes will exponentially try to schedule the Pod again; to speed things up delete one of your pods (kubectl delete pods <pod-name>) to reschedule it immediately.

这篇关于为什么广告连播状态仍为“待处理"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆