-
clone this repo
-
yarn install
-
install MicroK8s
sudo snap install microk8s --classic # make accessable without sudo sudo usermod -a -G microk8s $USER sudo chown -f -R $USER ~/.kube su - $USER # tell docker, that the local registry is ok to use sudo cp daemon.json /etc/docker/daemon.json sudo systemctl restart docker # point kubectl command to microk8s.kubectl sudo snap alias microk8s.kubectl kubectl
-
microk8s enable dns ingress registry
-
setup mongodb replica set on the kubernetes cluster
git clone https://github.com/mongodb/mongodb-kubernetes-operator cd mongodb-kubernetes-operator microk8s.kubectl create namespace mongodb microk8s.kubectl create -f deploy/crds/mongodb.com_mongodb_crd.yaml microk8s.kubectl create -f deploy/ --namespace mongodb cd .. microk8s.kubectl apply -f mongodb.yaml -n mongodb
-
yarn deploy
-
clone this repo
-
yarn install
-
Make sure
kubectl
is istalled and it points to a cluster with ingress and container registry enabled -
Change cluster in the WORKSPACE file (line 65) to your cluster name and image_chroot (line 66) to your registry
-
setup mongodb replica set on the kubernetes cluster
git clone https://github.com/mongodb/mongodb-kubernetes-operator cd mongodb-kubernetes-operator kubectl create namespace mongodb kubectl create -f deploy/crds/mongodb.com_mongodb_crd.yaml kubectl create -f deploy/ --namespace mongodb cd .. kubectl apply -f mongodb.yaml -n mongodb
-
yarn deploy
I've created this repository, because I wanted to showcase a connection issue. But after creating it from scratch it seems as if there is no issue š¤¦
Related issue link: mongodb/mongodb-kubernetes-operator#108