Development Guide
Development guide for MongoDB Operator
Pre-requisites
Access to Kubernetes cluster
First, you will need access to a Kubernetes cluster. The easiest way to start is minikube.
Tools to build an Operator
Apart from kubernetes cluster, there are some tools which are needed to build and test the MongoDB Operator.
Building Operator
To build the operator on local system, we can use make
command.
$ make manager
...
go build -o bin/manager main.go
MongoDB operator gets packaged as a container image for running on the Kubernetes cluster.
$ make docker-build
If you want to play it on Kubernetes. You can use a minikube.
$ minikube start --vm-driver virtualbox
...
π minikube v1.0.1 on linux (amd64)
π€Ή Downloading Kubernetes v1.14.1 images in the background ...
π₯ Creating kvm2 VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
πΆ "minikube" IP address is 192.168.39.240
π³ Configuring Docker as the container runtime ...
π³ Version of container runtime is 18.06.3-ce
β Waiting for image downloads to complete ...
β¨ Preparing Kubernetes environment ...
π Pulling images required by Kubernetes v1.14.1 ...
π Launching Kubernetes v1.14.1 using kubeadm ...
β Waiting for pods: apiserver proxy etcd scheduler controller dns
π Configuring cluster permissions ...
π€ Verifying component health .....
π kubectl is now configured to use "minikube"
π Done! Thank you for using minikube!
$ make test
Last modified February 5, 2022: [Docs][Add] Added docs for v0.1.0 (#29) (facc90e)