当前位置: 首页 > news >正文

kubeflow Pods stuck in Pending state

问题如图


查看详细

kubectl -n kubeflow describe pod minio-d56488484-5drv8

发现pvc没有绑定

解决:
查看pvc

 kubectl -n kubeflow get pvc


查看pvc描述

 kubectl get pvc minio-pv-claim -n kubeflow -o yaml
...
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 20Gi
  storageClassName: storageclass-default
  volumeMode: Filesystem
  volumeName: pv-volume1
status:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 20Gi
  phase: Bound

  capacity:
    storage: 20Gi 即为所需的磁盘空间大小。

kubectl describe pv local-pv-0

Name:              local-pv-0
Labels:            <none>
Annotations:       kubectl.kubernetes.io/last-applied-configuration:
                     {"apiVersion":"v1","kind":"PersistentVolume","metadata":{"annotations":{},"name":"local-pv-0"},"spec":{"accessModes":["ReadWriteOnce"],"ca...
                   pv.kubernetes.io/bound-by-controller: yes
Finalizers:        [kubernetes.io/pv-protection]
StorageClass:      storageclass-default
Status:            Bound
Claim:             kube-operator/f2c-prometheus-server
Reclaim Policy:    Retain
Access Modes:      RWO
VolumeMode:        Filesystem
Capacity:          100Gi
Node Affinity:     
  Required Terms:  
    Term 0:        kubernetes.io/hostname in [worker1.prophecis.software.dc]
Message:           
Source:
    Type:  LocalVolume (a persistent volume backed by local storage on a node)
    Path:  /opt/prophecis/local/f2c0
Events:    <none>

Path:  /opt/prophecis/local/f2c0 为pv绑定的主机实际空间,需到各worker节点查看有没有这个目录,如果没有就创建。

mkdir -p   /opt/prophecis/local/f2c0

并用df -h 查看剩余空间是否足够。

Filesystem               Size  Used Avail Use% Mounted on
devtmpfs                 7.8G     0  7.8G   0% /dev
tmpfs                    7.8G     0  7.8G   0% /dev/shm
tmpfs                    7.8G   84M  7.7G   2% /run
tmpfs                    7.8G     0  7.8G   0% /sys/fs/cgroup
/dev/mapper/centos-root   44G   18G   26G  41% /

 

There are three pods that have Persistent Volume Claims (PVCs) that will get stuck in pending state if they are unable to bind their PVC. The three pods are minio, mysql, and katib-mysql. Check the status of the PVC requests:

kubectl -n ${NAMESPACE} get pvc
  • Look for the status of “Bound”
  • PVC requests in “Pending” state indicate that the scheduler was unable to bind the required PVC.

If you have not configured dynamic provisioning for your cluster, including a default storage class, then you must create a persistent volume for each of the PVCs.

You can use the example below to create local persistent volumes:

sudo mkdir /mnt/pv{1..3}

kubectl create -f - <<EOF
kind: PersistentVolume
apiVersion: v1
metadata:
  name: pv-volume1
spec:
  storageClassName:
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/pv1"
---
kind: PersistentVolume
apiVersion: v1
metadata:
  name: pv-volume2
spec:
  storageClassName:
  capacity:
    storage: 20Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/pv2"
---
kind: PersistentVolume
apiVersion: v1
metadata:
  name: pv-volume3
spec:
  storageClassName:
  capacity:
    storage: 20Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/pv3"
EOF

Once created the scheduler will successfully start the remaining three pods. The PVs may also be created prior to running any of the kfctl commands.

OpenShift

相关文章:

  • String的split方法的使用
  • k8s pv 一直是release状态
  • 使用DateFormat把时间长度格式化为时:分:秒格式
  • centos 7 安装go遇到问题: No package golang available.
  • javascript可以直接比较时间字符串的大小
  • centos 把程序所在目录加入到环境变量的配置文件中
  • 分析hibernate中table per class hierarchy映射方式的一个异常
  • linux 磁盘分区
  • oracle分页查询的排序问题
  • centos7 配置yum源
  • 常用CSS缩写语法总结
  • Kubernetes集群flannel网卡名不兼容导致启动失败问题
  • 关于oracle的递归查询
  • docker19.03.15版本k8s集群配置GPU支持
  • du -sh * 查看文件夹中的文件大小。。
  • ----------
  • Android Volley源码解析
  • Android系统模拟器绘制实现概述
  • Apache Spark Streaming 使用实例
  • eclipse的离线汉化
  • Laravel Telescope:优雅的应用调试工具
  • Linux gpio口使用方法
  • OpenStack安装流程(juno版)- 添加网络服务(neutron)- controller节点
  • vue2.0项目引入element-ui
  • Web Storage相关
  • 基于Vue2全家桶的移动端AppDEMO实现
  • 每天10道Java面试题,跟我走,offer有!
  • 盘点那些不知名却常用的 Git 操作
  • 以太坊客户端Geth命令参数详解
  • 中国人寿如何基于容器搭建金融PaaS云平台
  • 阿里云服务器如何修改远程端口?
  • ​比特币大跌的 2 个原因
  • # 深度解析 Socket 与 WebSocket:原理、区别与应用
  • #前后端分离# 头条发布系统
  • (0)Nginx 功能特性
  • (1/2) 为了理解 UWP 的启动流程,我从零开始创建了一个 UWP 程序
  • (32位汇编 五)mov/add/sub/and/or/xor/not
  • (pytorch进阶之路)CLIP模型 实现图像多模态检索任务
  • (第二周)效能测试
  • (二十三)Flask之高频面试点
  • (附源码)apringboot计算机专业大学生就业指南 毕业设计061355
  • (个人笔记质量不佳)SQL 左连接、右连接、内连接的区别
  • (六)软件测试分工
  • (幽默漫画)有个程序员老公,是怎样的体验?
  • (转)chrome浏览器收藏夹(书签)的导出与导入
  • .mysql secret在哪_MYSQL基本操作(上)
  • .NET Entity FrameWork 总结 ,在项目中用处个人感觉不大。适合初级用用,不涉及到与数据库通信。
  • .NET 编写一个可以异步等待循环中任何一个部分的 Awaiter
  • .net 反编译_.net反编译的相关问题
  • .NET 中使用 TaskCompletionSource 作为线程同步互斥或异步操作的事件
  • .NET 自定义中间件 判断是否存在 AllowAnonymousAttribute 特性 来判断是否需要身份验证
  • .NET基础篇——反射的奥妙
  • .net知识和学习方法系列(二十一)CLR-枚举
  • .pyc文件是什么?
  • /etc/fstab 只读无法修改的解决办法