Search code examples
kuberneteskubernetes-helm

Operator or Helm chart for MongoDB replicas


What is the pro/cons of using an operator (like https://github.com/kbst/mongodb) to manage mongodb inside k8s over using Helm chart (like https://github.com/helm/charts/tree/master/stable/mongodb-replicaset) ?


Solution

  • The operator you linked to does not appear to be very useful (or well documented), so please consider my answer a more general one...

    Technically speaking all a Helm chart can do is use existing Kubernetes primitives, e.g., StatefulSet, Service, Deployment, and so forth.
    But sometimes we need more custom/specialized tools that are more aware of specifically what they control and are responsible to run.
    So for example, a MySQL operator might make it easier to take (reliable) backups or reliably restore the DB from those backups -- something specific to MySQL that Kubernetes doesn't (and shouldn't) know anything about.
    Another example would be scaling-up; some distributed systems require steps beyond just running a new container in order for that container to join an existing cluster.
    The operator can take care of that, whereas Helm/Tiller provide no such tools (and are not meant/designed to).

    Hope this helps!