I am trying to model stateful component/services (e.g. CouchBase, Postgres, etc) in Kubernetes. In Kubernetes, replication controller object requires a template for pod to cookie cut (replicate) pods. If the pod is for a stateful component, then the template will be required to include the persistent volume claim. If I specify a persistent claim in template of a replication controller, then that might (have not tried it, but logically) result in sharing of persistent volume claim between different pods and as a consequence resulting in conflict between multiple pods.
How to assign a different persistent volume claim to each pod when using replication controller for managing pods? How to model stateful components in Kubernetes using replication controller?