What are some of the use cases where an access mode of "ReadWriteOnce" would be useful for pods? Considering that there will always be more than one instance of a pod on a cluster, when would "ReadWriteOnce" really be useful?
Or am i missing something ?
The RWO is useful for any application that will not be sharing it’s volume with other pods. For instance, if you launch a Jenkins application it does not need to share it’s volume with other Jenkins instances running. Each would want its own volume and it’s own $JENKINS_HOME location. Think of a ReadWriteOnce volume as a local volume/EBS volume rather than a network share/EFS mount.
What John said ^^ :+1:
Thank you, that explanation is helpful. However i was always under the impression that to run Jenkins in an HA mode, the home must be shared among musters.Anyway, i may have been wrong. But continuing with your explanation, if i scale up such a deployment which uses a RWO PVC, then how would that volume binding work since the PVC mode is RWO ? Or would we use the RWO bind for a single pod deployment?
Jenkins HA is a special use case (and the idea of Jenkins HA in Kubernetes is a little redundent.) If the pods in your deployment need to access a common filesystem then you would definitely want to define the claim as RWX. But if each instance doesn’t need to share data you could use RWO and give each replica its own volume. The commercial version of enterprise Jenkins uses RWO PVCs. It all depends on if the individual replicas need to write to a common volume or not.
Thank you, that was very insightful