<p>I am trying to configure MongoDB ops manager on Kubernetes, I have a PersistentVolumeClaim based on dynamic provisioning based on CEPH and configured it successfully, What I am trying to do is to define the volume mounts and volumes in MongoDBOpsManager YAML file, I tried different things but couldn't define them</p>
<p>here is my MongoDBOpsManager yaml file:</p>
<pre><code>apiVersion: mongodb.com/v1
kind: MongoDBOpsManager
metadata:
name: ops-manager
namespace: mongodb
# podSpec:
#   podTemplate:
#     spec:
#       containers:
#       - name: mongodb-enterprise-database
#         volumeMounts:
#           - name: mongo-persistent-storage
#             mountPath: /data/db
#         volumes:
#           - name: mongo-persistent-storage
#             persistentVolumeClaim:
#             claimName: mongo-pvc
spec:
# the version of Ops Manager distro to use
version: 4.2.4
containers:
    - name: mongodb-ops-manager
        volumeMounts:
        - name: mongo-persistent-storage
            mountPath: /data/db
        volumes:
        - name: mongo-persistent-storage
            persistentVolumeClaim:
            claimName: mongo-pvc

# the name of the secret containing admin user credentials.
adminCredentials: ops-manager-admin-secret

externalConnectivity:
    type: NodePort

# the Replica Set backing Ops Manager. 
# appDB has the SCRAM-SHA authentication mode always enabled
applicationDatabase:
    members: 3
statefulSet:
spec:
#    volumeClaimTemplates:letsChangeTheWorld1
    template:
    spec:
    containers:
    - name: mongodb-ops-manager
        volumeMounts:
        - name: mongo-persistent-storage
            mountPath: /data/db
        volumes:
        - name: mongo-persistent-storage
            persistentVolumeClaim:
            claimName: mongo-pvc
</code></pre>
<p>I don't know where should I put the volume mounts and volume definition</p>
<p>I the ops manager om is created successfully but when I check the created pod for it I found this error</p>
<p>running &quot;VolumeBinding&quot; filter plugin for pod &quot;ops-manager-db-0&quot;: pod has unbound immediate PersistentVolumeClaims</p>

tarek salem
<pre><code>spec:
  containers:
  - image:
     ....
    volumeMounts:
      .....
  - image:
    ....  
    volumeMounts:
    ......
  volumes:
  - name:
</code></pre>
<p>Volumes tag should come parallel to containers.
Volumes are defined globally for all containers and mounts are speific to containers</p>
<p>Example: <a href="https://kubernetes.io/docs/concepts/storage/volumes/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/volumes/</a></p>
<p>Check with this once</p>
