Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.71 KB

build_operator_locally.md

File metadata and controls

54 lines (36 loc) · 1.71 KB

Quick start for building and deploy the operator locally

This document contains a quickstart guide to build and deploy the operator locally.

Prerequisites

This guide assumes that you have already prepared Python virtual env and installed the following tools:

Steps

  1. Create a local kubernetes cluster and start a local registry by running
./scripts/dev/setup_kind_cluster.sh -n test-cluster
  1. Alternatively create a local cluster and set current kubectl context to it.
./scripts/dev/setup_kind_cluster.sh -en test-cluster
  1. Run the following to get kind credentials and switch current context to the newly created cluster:
kind export kubeconfig --name test-cluster
# should return kind-test-cluster
kubectl config current-context
# should have test-cluster-control-plane node listed
kubectl get nodes
  1. If you didn't clone the repository with --recurse-submodules flag you will need to download the helm-chart submodule locally by running the following command:
git submodule update --init
  1. Build and deploy the operator:
# builds all required images and then deploys the operator
make all-images deploy

Note: this will build and push the operator at repo_url/mongodb-kubernetes-operator, where repo_url is extracted from the dev config file

  1. Change the image field in the manager.yaml file to have the image you just built

  2. You can now deploy your resources following the docs