kubernetes mysql chown operation not permitted

I am currently experimenting with Kubernetes and have installed a small cluster on ESX infra I had running here locally. I installed two slave nodes with a master node using Project Atomic with Fedora. The cluster is all installed fine and seems to be running. However I first want to get a MySQL container up and running, but no matter what I try i cannot get it to run.

apiVersion: v1
kind: Pod
  name: mysql
    name: mysql
    - resources:
       limits :
          cpu: 0.5
      image: mysql:5.6
      name: mysql
        - name: MYSQL_ROOT_PASSWORD
          value: myPassw0rd
        - containerPort: 3306
          name: mysql
        - name: mysql-persistent-storage
          mountPath: /var/lib/mysql
    - name: mysql-persistent-storage
        path: "/export/mysql"

For the volume I already tried all kinds of solutions, I tried using persistent volume with and without claim. I tried using host volume and emptyDir, but I always end up with this error when the container starts:

  • Docker intermittently failing when building image
  • Issue in building docker image using habitus
  • How to change docker container's source code without restarting it?
  • How docker manages machine configuration
  • How to conditionally mount host-container volume in dev environment and ADD at build time?
  • Is it possible to update Docker on CoreOS without updating fleet and etcd?
  • chown: changing ownership of ‘/var/lib/mysql/’: Operation not permitted

    I must be doing something stupid, but no idea what to do here?

  • How to run same docker images twice
  • Move boot2docker and .docker folder in other drive
  • Docker-compose: Database is uninitialized
  • Pull docker image which is not pushed to repository
  • Multiple folders in one docker volume
  • How to user docker exec with zsh
  • One Solution collect form web for “kubernetes mysql chown operation not permitted”

    Ok it seems I can answer my own question, the problem was lying in the NFS share that was being used as the persistent volume. I had it set to ‘squash_all’ in the export but it needs to have a ‘no_root_squash’ to allow root in case of docker container to chown on the nfs bound volume.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.