...
MongoDB pods cannot start due to persistent volume mounting error.
\uD83C\uDF31 Solution
Configure Redeploy MongoDB to use a new persistent volume.
Run command: kubectl edit delete statefulset mongo -n <onelist namespace>Change
volumeMounts.Download the mongo.yaml file below.
View file | ||
---|---|---|
|
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.