0

I'm following this https://github.com/mongodb/mongodb-enterprise-kubernetes and https://docs.opsmanager.mongodb.com/current/tutorial/install-k8s-operator/ to deploy mongodb inside a Kubernetes cluster on DigitalOcean.

So far everything worked except the last step. Deploying mongodb. I'm trying to do like suggested in the documentation:

---
apiVersion: mongodb.com/v1
kind: MongoDbReplicaSet
metadata:
  name: mongodb-rs
  namespace: mongodb
spec:
  members: 3
  version: 4.0.4

  persistent: true

  project: project-0
  credentials: mongodb-do-ops

It doesn't work. The resource of type MongoDbReplicaSet is created, but no pods and services are deployed like written in docs.

kubectl --kubeconfig="iniside-k8s-test-kubeconfig.yaml" describe MongoDbReplicaSet mongodb-rs -n mongodb

Name:         mongodb-rs
Namespace:    mongodb
Labels:       <none>
Annotations:  <none>
API Version:  mongodb.com/v1
Kind:         MongoDbReplicaSet
Metadata:
  Creation Timestamp:  2018-11-21T21:35:30Z
  Generation:          1
  Resource Version:    2948350
  Self Link:           /apis/mongodb.com/v1/namespaces/mongodb/mongodbreplicasets/mongodb-rs
  UID:                 5e83c7b0-edd5-11e8-88f5-be6ffc4e4dde
Spec:
  Credentials:  mongodb-do-ops
  Members:      3
  Persistent:   true
  Project:      project-0
  Version:      4.0.4
Events:         <none>
6
  • Any output for kubectl describe MongoDbReplicaSet? Commented Nov 21, 2018 at 22:56
  • hey, added output to question. Commented Nov 21, 2018 at 23:01
  • no pods when you do a kubectl -n mongodb get pods? Commented Nov 21, 2018 at 23:13
  • Would you mind please reading the tag excerpt. before posting. "Questions should pertain to the scripting part. Questions about configuring servers should be asked on serverfault.com or superuser.com". This appears to be about adding configuration for server instances Commented Nov 21, 2018 at 23:19
  • Only operator pod, but pods with mongodb Commented Nov 21, 2018 at 23:25

1 Answer 1

1

I got it working. As It stands in documentation here: https://docs.opsmanager.mongodb.com/current/tutorial/install-k8s-operator/

data.projectName

Is not optional. After looking at operator logs, operator cloudn't create replica set deployment because projectName was missing in ConfigMap.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.