title: Is it recommended to run clustered database with Kubernetes in production environment?
body: <p>Is it reasonable to use Kubernetes for a clustered database such as MySQL in production environment? </p>
  
  <p>There are example configurations such as <a href="https://github.com/eBay/Kubernetes/tree/master/examples/mysql-galera" rel="noreferrer">mysql galera example</a>. However, most examples do not make use of persistent volumes. As far as I've understood persistent volumes must reside on some shared file system as defined here <a href="http://kubernetes.io/docs/user-guide/persistent-volumes/#types-of-persistent-volumes" rel="noreferrer">Kubernetes types of persistent volumes</a>. A shared file system will not guarantee that the database files of the pod will be local to the machine hosting the pod. It will be accessed over network which is rather slow. Moreover, there are issues with MySQL and NFS, for example. </p>
  
  <p>This might be acceptable for a test environment. However, what should I do in a production environment? Is it better to run the database cluster outside Kubernetes and run only application servers with Kubernetes?  </p>