i've a kubernetes cluster with a master node and 3 minions, i've already a glusterfs cluster, every node of kubernetes cluster have glusterfs-client installed and working. i'm trying to run a pod ( a simple mysql ) mounting /var/lib/mysql on glusterfs but i see:
Image: mysql:5.6 is ready, container is creating
i run: kubectl get event i see:
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
if i run kubectl describe pod mysql-9ym10 i see:
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
this is the yaml file for container:
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