Is there any way that can make each pod gets its own volume in RC template?

10/24/2015

When setting a persistentVolumeClaim in the kubernetes ReplicationController template, each pod will share the same persistent volume.

Is there any way that can make each pod gets its own volume in RC template? i don't want to create many RCs with replicas=1 with distinct persistentVolumeClaims.

-- Fei Peng
kubernetes

1 Answer

10/24/2015

No, you can't. A replication controller is a pod definition (mostly). And a pod is a collection of containers and attached volumes (mostly). Each pod is identical with the other pods.

So, again, no, you can't have different definitions for each replica, they are all identical.

-- cristi
Source: StackOverflow