Install Bahmni on Kubernetes Minikube for Development

This document outlines running bahmni kubernetes cluster using minikube for local development. Minikube in general is not recomeded for Production usage (while technically possible) - for the biggest reason that it runs a single node kubernetes cluster and would result in a single point of failure (even if it could handle managing and scaling pods).

Prerequisite Knowledge:


  1. Install docker

  2. Install minikube >=1.25.2

  3. Install Helm-3

  4. Increase resources of your docker to a memory of atleast 8GB. (Mac / Windows)

You can also run minikube without using docker. Look here.

Start minikube with decent resources

minikube start --driver=docker --memory 7000 --cpus=4

you should see

😄 minikube v1.25.2 on Darwin 10.15.7 ✨ Using the docker driver based on user configuration 👍 Starting control plane node minikube in cluster minikube 🚜 Pulling base image ... 🔥 Creating docker container (CPUs=4, Memory=7000MB) ...\

Enable Ingress

Ingress would act as a controller to route between various applicaitons

minikube addons enable ingress

Add nginx ingress host entry to etc host

MacOS / Linux

sudo vi /etc/hosts # bahmni kubernetes nginx-ingress bahmni.k8s # bahmni crater kubernetes nginx-ingress payments-bahmni.k8s


Run minikube tunnel in separate terminal

minikube tunnel runs as a process, creating a network route on the host to the
service CIDR of the cluster using the cluster’s IP address as a gateway. The
tunnel command exposes the external IP directly to any program running on the
host operating system.

sudo minikube tunnel --alsologtostderr -v=1

Run this in a separate terminal and keep it open

Running MySQL DB Server

We have notice some local connection issues while provisioning mysql via community helm chart. You could alternatively use the db/openmrsdb.yaml specs to create the mysql deployment with persistent volume

To uninstall or delete use

Running Database setup helm chart

This command takes a while to complete. Once it is completed run the following command to remove database root credentials from the cluster.

You can connect to your local mysql db using

followed by

Installing bahmni cluster using Helm-Umbrella Chart

Clone the helm-umbrella-chart repository and run below commands on your terminal (read the notes below if you need to toggle on/off certain services in the cluster)

Accessing Applications

Once the pods and services are running you can access it from the browser on

  1. Bahmni EMR --> https://bahmni.k8s/bahmni/home

  2. OpenMRS --> https://bahmni.k8s/openmrs

  3. Crater --> https://payments-bahmni.k8s/

The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)