Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MongoDB pods cannot start due to persistent volume mounting error.

\uD83C\uDF31 Solution

Configure Redeploy MongoDB to use a new persistent volume.

  1. Run command: kubectl edit delete statefulset mongo -n <onelist namespace>Change

  2. volumeMounts.Download the mongo.yaml file below.

View file
namemongo.yaml

3. Edit the mongo.yaml file. Change the persistent volume name to a new value that is different to the current value in your cluster. For example: mongo-persistent-volume-2

...

.

...

4. Run command: kubectl apply -f mongo.yaml -n <onelist namespace>

5. New MongoDB pods will start and mount to a new persistent volume.