简体   繁体   中英

kubernetes mongodb ops manager running “VolumeBinding” filter plugin for pod “ops-manager-db-0”: pod has unbound immediate PersistentVolumeClaims

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

here is my MongoDBOpsManager yaml file:

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

I don't know where should I put the volume mounts and volume definition

I the ops manager om is created successfully but when I check the created pod for it I found this error

running "VolumeBinding" filter plugin for pod "ops-manager-db-0": pod has unbound immediate PersistentVolumeClaims

spec:
  containers:
  - image:
     ....
    volumeMounts:
      .....
  - image:
    ....  
    volumeMounts:
    ......
  volumes:
  - name:

Volumes tag should come parallel to containers. Volumes are defined globally for all containers and mounts are speific to containers

Example: https://kubernetes.io/docs/concepts/storage/volumes/

Check with this once

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM