我有一个带有主节点和3个小兵的kubernetes集群,我已经有一个glusterfs集群,每个kubernetes集群的节点都安装了glusterfs-client并且可以正常工作。
我正在尝试在glusterfs上运行挂载/ var / lib / mysql的pod(一个简单的mysql),但我看到了:
Image: mysql:5.6 is ready, container is creating
我跑:
kubectl获取事件
我懂了:
Thu, 18 Feb 2016 10:08:01 +0100 Thu, 18 Feb 2016 10:08:01 +0100 1 mysql-9ym10 Pod scheduled {scheduler } Successfully assigned mysql-9ym10 to nodeXX
Thu, 18 Feb 2016 10:08:01 +0100 Thu, 18 Feb 2016 10:08:01 +0100 1 mysql ReplicationController successfulCreate {replication-controller } Created pod: mysql-9ym10
Thu, 18 Feb 2016 10:08:02 +0100 Thu, 18 Feb 2016 10:08:12 +0100 2 mysql-9ym10 Pod failedMount {kubelet nodeXX} Unable to mount volumes for pod "mysql-9ym10_default": exit status 1
Thu, 18 Feb 2016 10:08:02 +0100 Thu, 18 Feb 2016 10:08:12 +0100 2 mysql-9ym10 Pod failedSync {kubelet nodeXX} Error syncing pod, skipping: exit status 1
如果我跑
kubectl描述pod mysql-9ym10
我懂了:
Name: mysql-9ym10
Namespace: default
Image(s): mysql:5.6
Node: nodeXX/nodeXX
Labels: app=mysql
Status: Pending
Reason:
Message:
IP:
Replication Controllers: mysql (1/1 replicas created)
Containers:
mysql:
Image: mysql:5.6
State: Waiting
Reason: Image: mysql:5.6 is ready, container is creating
Ready: False
Restart Count: 0
Conditions:
Type Status
Ready False
Events:
FirstSeen LastSeen Count From SubobjectPath Reason Message
Thu, 18 Feb 2016 10:08:01 +0100 Thu, 18 Feb 2016 10:08:01 +0100 1 {scheduler } scheduled Successfully assigned mysql-9ym10 to nodeXX
Thu, 18 Feb 2016 10:08:02 +0100 Thu, 18 Feb 2016 10:10:22 +0100 15 {kubelet nodeXX} failedMount Unable to mount volumes for pod "mysql-9ym10_default": exit status 1
Thu, 18 Feb 2016 10:08:02 +0100 Thu, 18 Feb 2016 10:10:22 +0100 15 {kubelet nodeXX} failedSync Error syncing pod, skipping: exit status 1
这是容器的yaml文件:
apiVersion: v1
kind: ReplicationController
metadata:
name: mysql
spec:
replicas: 1
selector:
app: mysql
template:
metadata:
name: mysql
labels:
app: mysql
spec:
containers:
- name: mysql
image: mysql:5.6
ports:
- containerPort: 3306
env:
- name: MYSQL_ROOT_PASSWORD
value: password
volumeMounts:
- mountPath: /var/lib/mysql
name: glusterfsvol
volumes:
- glusterfs:
endpoints: glusterfs-cluster
path: glustervolume
readOnly: false
name: glusterfsvol
最佳答案
我已经配置了glusterfs ip地址的端点。
我知道发布的链接,我已经关注了,但是结果在我的第一篇文章中!
关于docker - 无法在glusterfs上运行具有容量的容器,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/35500809/