How can i use mongoconnector in kubernetes

3/17/2019

I want to use mongoconnector in kubernetes i found this

$ docker run -d --link=mongo:mongo --link=elasticsearch:elasticsearch yeasy/mongo-connector

The question is how i can run it in kubernetes

-- yasin lachini
docker
elasticsearch
kubernetes
mongodb

2 Answers

3/18/2019

Here is another example how you can run your connector as service on kubernetes cluster.

https://medium.com/devopslinks/scaling-mongodb-on-kubernetes-32e446c16b82

-- Abhi
Source: StackOverflow

3/18/2019

this will run docker image while kubernetes is orchestration engine. You have to upload this docker image to docker hub or have to check if it is available on docker hub.

so on Kubernetes you can run this docker images using the manifest files.

apiVersion: v1
kind: Deployment
metadata:
  name: mongoconnector
  labels:
    name: mongoconnector
spec:
  selector:
     matchlabels:
       name: mongoconnector
  template:
     metadata:
       lables:
         name: mongoconnector
     spec:
       containers:
       - name: mongo
         image: <DOCKER IMAGE>
-- Harsh Manvar
Source: StackOverflow