With Okteto Cloud, in order to let different pods/deployments access a shared PersistentVolumeClaim, I tried setting the PersistentVolumeClaim's accessModes
to "ReadWriteMany"
:
{
"kind": "PersistentVolumeClaim",
"apiVersion": "v1",
"metadata": {
"name": "pv-claim-cpdownloads"
},
"spec": {
"accessModes": [
"ReadWriteMany"
],
"resources": {
"requests": {
"storage": "10Gi"
}
}
}
}
Applying my deployment with kubectl
succeeds, but the deployment itself times out on the okteto web UI, with the error:
pod has unbound immediate PersistentVolumeClaims (repeated 55 times)
Now, the same PersistentVolumeClaim with accessModes
set to "ReadWriteOnce"
deploys just fine.
Is the accessMode "ReadWriteMany"
disallowed on Okteto Cloud ?
If it is, how could I get several pods/deployments to access the same volume data ?
For precisions, in my case I think I technically only need one pod to write to the volume and the other one to read from it.
My use case is to have one container save files to a folder, and another container watches changes and loads files from that same folder.