版本描述:

kubernetes 1.9.0

CentOS Linux release 7.2.1511 (Core)

问题描述:

kubernetes挂载nfs发现发现pod一直处于containercreating状态,describe pod 发现报错如下:

[root@master nginx-ip]# kubectl describe pod nginx-r67f7

Name:           nginx-r67f7

Namespace:      default

Node:           master/10.168.xx.xx

Start Time:     Sun, 10 Jun 2018 09:47:50 +0800

Labels:         name=nginx

Annotations:

Status:         Pending

IP:

Controlled By:  ReplicationController/nginx

Containers:

nginx:

Container ID:

Image:          reg.xx.xx/library/nginx-ip:0.4

Image ID:

Port:           80/TCP

State:          Waiting

Reason:       ContainerCreating

Ready:          False

Restart Count:  0

Environment:

Mounts:

/usr/share/nginx/html from httpd-storage (rw)

/var/run/secrets/kubernetes.io/serviceaccount from default-token-drh57 (ro)

Conditions:

Type          Status

Initialized   True

Ready         False

Volumes:

httpd-storage:

Type:      NFS (an NFS mount that lasts the lifetime of a pod)

Server:    10.168.xx.xx

Path:      /data/web

ReadOnly:  false

default-token-drh57:

Type:        Secret (a volume populated by a Secret)

SecretName:  default-token-drh57

Optional:    false

QoS Class:       BestEffort

Node-Selectors:

Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s

node.kubernetes.io/unreachable:NoExecute for 300s

Events:

Type     Reason       Age   From                     Message

—-     ——       —-  —-                     ——-

Warning  FailedMount  18s   kubelet, master  MountVolume.SetUp failed for volume "httpd-storage" : mount failed: exit status 32

Mounting command: systemd-run

Mounting arguments: –description=Kubernetes transient mount for /var/lib/kubelet/pods/4868802e-6c50-11e8-b8b6-b083feea4d48/volumes/kubernetes.io~nfs/httpd-storage –scope — mount -t nfs 10.168.xx.xx:/data/web /var/lib/kubelet/pods/4868802e-6c50-11e8-b8b6-b083feea4d48/volumes/kubernetes.io~nfs/httpd-storage

Output: Running scope as unit run-34311.scope.

mount: wrong fs type, bad option, bad superblock on 10.168.xx.xx:/data/web,

missing codepage or helper program, or other error

(for several filesystems (e.g. nfs, cifs) you might

need a /sbin/mount. helper program)

In some cases useful info is found in syslog – try

dmesg | tail or so.

Normal   SuccessfulMountVolume  18s  kubelet, master  MountVolume.SetUp succeeded for volume "default-token-drh57"

Warning  FailedMount            17s  kubelet, master  MountVolume.SetUp failed for volume "httpd-storage" : mount failed: exit status 32

Mounting command: systemd-run

Mounting arguments: –description=Kubernetes transient mount for /var/lib/kubelet/pods/4868802e-6c50-11e8-b8b6-b083feea4d48/volumes/kubernetes.io~nfs/httpd-storage –scope — mount -t nfs 10.168.xx.xx:/data/web /var/lib/kubelet/pods/4868802e-6c50-11e8-b8b6-b083feea4d48/volumes/kubernetes.io~nfs/httpd-storage

Output: Running scope as unit run-34316.scope.

mount: wrong fs type, bad option, bad superblock on 10.168.xx.xx:/data/web,

missing codepage or helper program, or other error

(for several filesystems (e.g. nfs, cifs) you might

need a /sbin/mount. helper program)

In some cases useful info is found in syslog – try

dmesg | tail or so.

Warning  FailedMount  16s  kubelet, master  MountVolume.SetUp failed for volume "httpd-storage" : mount failed: exit status 32

Mounting command: systemd-run

Mounting arguments: –description=Kubernetes transient mount for /var/lib/kubelet/pods/4868802e-6c50-11e8-b8b6-b083feea4d48/volumes/kubernetes.io~nfs/httpd-storage –scope — mount -t nfs 10.168.xx.xx:/data/web /var/lib/kubelet/pods/4868802e-6c50-11e8-b8b6-b083feea4d48/volumes/kubernetes.io~nfs/httpd-storage

Output: Running scope as unit run-34325.scope.

mount: wrong fs type, bad option, bad superblock on 10.168.xx.xx:/data/web,

missing codepage or helper program, or other error

(for several filesystems (e.g. nfs, cifs) you might

need a /sbin/mount. helper program)

In some cases useful info is found in syslog – try

dmesg | tail or so.

Warning  FailedMount  14s  kubelet, master  MountVolume.SetUp failed for volume "httpd-storage" : mount failed: exit status 32

Mounting command: systemd-run

Mounting arguments: –description=Kubernetes transient mount for /var/lib/kubelet/pods/4868802e-6c50-11e8-b8b6-b083feea4d48/volumes/kubernetes.io~nfs/httpd-storage –scope — mount -t nfs 10.168.xx.xx:/data/web /var/lib/kubelet/pods/4868802e-6c50-11e8-b8b6-b083feea4d48/volumes/kubernetes.io~nfs/httpd-storage

Output: Running scope as unit run-34341.scope.

mount: wrong fs type, bad option, bad superblock on 10.168.xx.xx:/data/web,

missing codepage or helper program, or other error

(for several filesystems (e.g. nfs, cifs) you might

need a /sbin/mount. helper program)

In some cases useful info is found in syslog – try

dmesg | tail or so.

Warning  FailedMount  10s  kubelet, master  MountVolume.SetUp failed for volume "httpd-storage" : mount failed: exit status 32

Mounting command: systemd-run

Mounting arguments: –description=Kubernetes transient mount for /var/lib/kubelet/pods/4868802e-6c50-11e8-b8b6-b083feea4d48/volumes/kubernetes.io~nfs/httpd-storage –scope — mount -t nfs 10.168.xx.xx:/data/web /var/lib/kubelet/pods/4868802e-6c50-11e8-b8b6-b083feea4d48/volumes/kubernetes.io~nfs/httpd-storage

Output: Running scope as unit run-34364.scope.

mount: wrong fs type, bad option, bad superblock on 10.168.xx.xx:/data/web,

missing codepage or helper program, or other error

(for several filesystems (e.g. nfs, cifs) you might

need a /sbin/mount. helper program)

In some cases useful info is found in syslog – try

dmesg | tail or so.

Warning  FailedMount  2s  kubelet, master  MountVolume.SetUp failed for volume "httpd-storage" : mount failed: exit status 32

Mounting command: systemd-run

Mounting arguments: –description=Kubernetes transient mount for /var/lib/kubelet/pods/4868802e-6c50-11e8-b8b6-b083feea4d48/volumes/kubernetes.io~nfs/httpd-storage –scope — mount -t nfs 10.168.xx.xx:/data/web /var/lib/kubelet/pods/4868802e-6c50-11e8-b8b6-b083feea4d48/volumes/kubernetes.io~nfs/httpd-storage

Output: Running scope as unit run-34394.scope.

mount: wrong fs type, bad option, bad superblock on 10.168.xx.xx:/data/web,

missing codepage or helper program, or other error

(for several filesystems (e.g. nfs, cifs) you might

need a /sbin/mount. helper program)

In some cases useful info is found in syslog – try

dmesg | tail or so.

看这个报错想是容器没有安装nfs-common  nfs-utils软件包安装导致,容器安装完这两个包发现,还是报这个错误,经过不懈的google,终于发现需要将这两个软件包安装到宿主机上即可。

yum install nfs-common  nfs-utils -y

可能是因为镜像分层机制导致。

k8s 安装nfs_kubernetes挂载nfs报错 | 运维笔记相关推荐

  1. 老男孩的linux运维笔记-初级部分内容(一)

    ############################################################ # # USER          YYYY-MM-DD – ACTION # ...

  2. linux nfs引起重启,linux下面重启nfs报错:nfs-server.service:main process exited

    linux下面重启nfs报错:nfs-server.service:main process exited [root@dhcp-66-83-39 images]# service rpcbind s ...

  3. Linux/ubuntu 安装 redis 4.0报错解决:redis-server.service: Can't open PID file /var/run/redis/redis-server.

    此文首发于我的个人博客:Linux/ubuntu 安装 redis 4.0报错解决:redis-server.service: Can't open PID file /var/run/redis/r ...

  4. tensorflow1.14.0安装不上,报错

    pip install tensorflow==1.14.0 -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow1.14.0安装不上,报错 M ...

  5. Yum编译安装Error Downloading Packages报错

    Yum编译安装Error Downloading Packages报错 在编译安装FS环境的时候发现如何报错: yum编译执行命令如下: yum install ntpdate wget autoco ...

  6. 安装32位mysql报错_在CentOS中安装32位或64位MySql报错error: Failed dependencies解决办法...

    在CentOS中安装MySql报错error: Failed dependencies解决办法 安装64位MySql报错内容如下: error: Failed dependencies: libaio ...

  7. CentOS 7安装Development Tools 失败 报错 group tools does not exist. Maybe run: yum groups mark install

    重装centos,以及迁移时,碰见这个问题.如下图: CentOS 7安装Development Tools 失败 报错 group tools does not exist. Maybe run: ...

  8. 笔记:windows 2012 安装SQL 2008 群集报错

    http://blog.sina.com.cn/s/blog_3fa319f70101hc3z.html 现象: 在已安装群集服务并已群集MSDTC资源后,运行SQL2008R2群集添加向导时,在安装 ...

  9. 安装opencv3.4.0报错

    安装 opencv-3.4.0报错: fatal error: opencv2/xfeatures2d/cuda.hpp: No such file or directory 解决办法: 1. 查找该 ...

最新文章

  1. 微软披露拓扑量子计算机计划!
  2. 《编译与反编译技术实战》——2.1节编译器、解释器及其工作方式
  3. java.lang.RuntimeException: Canvas: trying to draw too large(203212800bytes) bitmap.
  4. 三丶傻妞机器人安装教程+命令+青龙面板对接傻妞
  5. Jenkins 部署
  6. CF-778 C.Peterson Polyglot (Trie合并)
  7. java简单词法分析器(源码下载)
  8. 干得最多最累,工资还不如新人
  9. 关于腾讯应用管理中心,认领应用
  10. 构建linux内核源码树
  11. 30个高质量的Psd设计文件分享
  12. 摩托罗拉里程碑升级Android 2.2刷机知识
  13. atitit.提升兼容性最佳实践 p825.doc
  14. C语言system函数使用
  15. [思维导图学习五] 思维导图在企业培训中的应用[转]
  16. 中国IP网通IP地址段
  17. 隐藏Ubuntu引导,直接进入系统——变色龙引导Linux,Windows,Mac OS(苹果系统)攻略之二
  18. git push you are not allowed to upload merges
  19. 【NOI2008】 糖果雨
  20. XMind 常用快捷键(思维导图总结)

热门文章

  1. HTML5 JavaScript CSS 表单实现购物优惠打折
  2. 关于ALEXA的流量排名的参数介绍
  3. 淘宝商品详情页API接口|tb获取商品主图接口
  4. Linux集中日志服务器rsyslog
  5. win10打开网路邻居计算机,win10系统下网上邻居不能访问其他电脑的解决方法
  6. 预推免面试准备 - C语言
  7. 常用的激活函数sigmoid,relu,tanh
  8. 国民技术RTC备份寄存器RTC_BKP
  9. 网站制作网站制作如何实现图文并茂
  10. 使用docker部署nginx搭建简单的idea-2019 jrebel插件激活服务器