- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在我公司的 Kubernetes 集群上运行了几个 wordpress 实例。每个实例都有自己的持久性卷和容器。我的设置的唯一特点是我将 PV 的多个路径安装到容器的多个路径上。
自几周前我们将 Kubernetes 升级到当前版本以来,我的所有容器都运行良好。从此, hell 开始了。
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:38:32Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:25:46Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
当重新启动 pod 时,如果它被安排在不同的节点上运行,它会卡在 PodInitializing 并显示以下事件消息
Multi-Attach error for volume "pvc-ac6b35f3-7716-11e8-adda-b60483de6a40" Volume is already exclusively attached to one node and can't be attached to another
这是我的资源。
它包含两个目录和一个文件
html/
: 包含 php 文件的目录logs/
:包含日志文件的目录container-data.txt
:包含一些信息的文本文件定义为:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: rbd-wordpress-mysite
labels:
app: wordpress
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
kind: Deployment
apiVersion: apps/v1beta1
metadata:
name: wordpress-mysite
labels:
app: wordpress
namespace: unibz
spec:
template:
metadata:
name: wordpress-mysite
labels:
app: wordpress
namespace: unibz
spec:
containers:
- name: wordpress-mysite
image: myimage
volumeMounts:
- mountPath: "/root/container-data.txt"
name: wordpress-data
subPath: container-data.txt
- mountPath: "/var/www/html"
name: wordpress-data
subPath: html
- mountPath: "/var/log/apache2"
name: wordpress-data
subPath: logs
ports:
- containerPort: 80
name: wordpress-http
volumes:
- name: wordpress-data
persistentVolumeClaim:
claimName: rbd-wordpress-mysite
- name: wordpress-conf
configMap:
name: wordpress-conf
这种使用持久性的方式错了吗?会不会是 Multi-Attach 错误的原因?
最佳答案
看起来您正在尝试附加相同的 PVC
进入不同的节点
。
Access Modes Claims use the same conventions as volumes when requesting storage with specific access modes
在你的 .yaml
我可以看到,你设置了 accessModes: ReadWriteOnce
。
A
PersistentVolume
can be mounted on a host in any way supported by the resource provider. As shown in the table below, providers will have different capabilities and each PV’s access modes are set to the specific modes supported by that particular volume. For example, NFS can support multiple read/write clients, but a specific NFS PV might be exported on the server as read-only. Each PV gets its own set of access modes describing that specific PV’s capabilities.The access modes are:
ReadWriteOnce – the volume can be mounted as read-write by a single node
ReadOnlyMany – the volume can be mounted read-only by many nodes
ReadWriteMany – the volume can be mounted as read-write by many nodes
来自关于 Persistent Volumes
的 Kubernetes 文档你可以读到 CephFS 确实支持所有 accessModes
关于Kubernetes:我可以将同一 PV 的不同子路径挂载到同一容器的不同位置吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54355060/
我有一个 Kubernetes 集群设置(本地),它有一个 NFS 共享(my-nfs.internal.tld)安装到 /exports/backup在每个节点上创建备份。 现在我正在设置我的日志记
开发商! 我遇到了错误消息 Error in if (obs 通过分配 x = nrstp$V3和 weight = invdist , 你会得到 mean(x) = 0 .这导致 y=0 , c
根据官方文档 https://kubernetes.io/docs/tasks/administer-cluster/change-pv-reclaim-policy/使用“保留”策略可以手动恢复 P
环境信息: Computer detail: One master node and four slave nodes. All are CentOS Linux release 7.8.2003 (
我正在尝试了解Kubernetes如何处理节点文件系统上的持久卷。 例如,如果我有一个minikube作为我的Kubernetes集群节点,并且我用PVC为may pod创建了多个PV,并且我通过ss
有状态集 es-data 在我们的测试环境中失败,我被要求删除相应的 PV。 所以我删除了es-data的以下内容: 1) 聚氯乙烯 2) 光伏 他们显示为终止并被留在周末。今天早上到达时,他们仍然显
我可以将同一个 PV 的不同子路径挂载到同一个容器的不同位置吗? 我在我公司的 Kubernetes 集群上运行了几个 wordpress 实例。每个实例都有自己的持久性卷和容器。我的设置的唯一特点是
我一直在努力运行简单的3节点Kubernetes集群。 $ kubectl get nodes
我正在开发PV(光伏)模块特性图的模拟应用程序。需要帮助,因为我不太了解电学,无法将公式适应 Java 代码。 I = f(V) function (I-V characteristic) 和 P =
我有一个 3 节点 coros kubernetes 集群启动并运行。 我想使用来自独立 NFS 服务器的 persitentvolumes(pv)。 nfs.yaml apiVersion: v1
如果我运行 mkdir -pv,-p 可以工作,但我没有得到详细的输出;但是,如果我只运行 mkdir -v,则会出现预期的详细输出。同样值得注意的是,-v 的长格式似乎根本不起作用。 根据我的测试:
'/usr/local/bin/wave' 只接受文件名作为输入,因此我需要调用该过程,然后“发送”命令,并等待写入输出文件。然后我的进程可以继续读取输出文件。这是我的代码,它不会写入输出文件: hd
因此,我尝试将文件的输出(使用 get 检索)提供到日志文件中。 我拥有的是这样的: get whateverfile | pv > somefile.log 我也尝试过用 xargs 来喂养它:
我正在做备份 dd if=/dev/vda1 | lzop >/etc/BACKUP/im.lzo 我想使用命令 pv 查看进度条,但我不知道正确的语法是什么。 我试过: pv dd if=/dev/
我正在尝试制作一个小脚本来显示目录在磁盘上使用的总存储空间。为了弄清楚我正在使用 du 命令。但是,为了在 DU 处理一个非常大的目录时向用户提供一些反馈,我想通过管道运行输出并显示行数,这样用户也可
所以我正在尝试使用 PV 为各种命令(即 tar)创建进度条。我在 ruby 脚本中运行这些命令。问题在于,由于 pv 是管道链中的最后一个命令,它吸收了所有错误。 即。 result = `ta
我正在使用 pv 实用程序来评估将日志条目添加到日志文件中的速度,如下所示: tail -f -n 0 mylog.log | pv -lr -t -i 5 > /dev/null 这会输出添加速度并
欢迎访问我的GitHub 这里分类和汇总了欣宸的全部原创(含配套源码): https://github.com/zq2599/blog_demos 本篇概览 欣
我这个想法源自4月份的Twitter开发者大会,公布数据是Twitter日访问量30亿,年增长1500%,日搜索请求6亿,日独立访问者1.8亿,每天5500万个Tweets,所有这些主要都是通过AP
我的学士论文有点卡住了,希望你能帮助我。为了评估光伏系统,我需要计算总能量之间的差异。这些在带有时间戳但没有 ID 号的 MySQL 表中自动更新。我需要自动获取这些能量之间的增量/差异作为额外的列,
我是一名优秀的程序员,十分优秀!