[SOLVED] Replicasets are not creating in mongodb community operator

Issue

I am creating mongodb cluster using following documentation.

https://github.com/mongodb/mongodb-kubernetes-operator/blob/master/docs/deploy-configure.md

I am trying to create custom resources as following.

kubectl apply -f config/samples/mongodb.com_v1_mongodbcommunity_cr.yaml

It is saying created successfully but I am unable to see any replicaset created for that and also no pods are being created for the same. I am using minikube to generate resources.

Solution

Got the issue as I came to know how can we check logs of custom "kind" in Kubernetes.

As I checked mongodbcommunity kind as follows. And it was giving failed stage.

kubectl get mongodbcommunity

Then I checked the following command for mongodbcommunity.

kubectl describe mongodbcommunity

It was showing errors as secrets are not found. I had changed credentials in custom resources but didn’t update in secrets. So it was failing.

In the dashboard, nothing was happening and even during executing yaml no errors were showing up and were showing as "created".

So I just didn’t know how to check the issue for this but figured way and after correcting the username properly MongoDB cluster is working fine now.

Answered By – Anonymous Creator

Answer Checked By – Katrina (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *