Minikube out of resources

5/23/2019

Our company use Kubernetes in all our environments. as well as on our local Macbook using minikube.

We have many microservices and most of them are running JVM which require a large amount of memory. We started to face an issue that we cannot run our stack on minikube due to out of memory of the local machine.

We thought about multiple solutions:

the first was to create a k8s cloud development environment and when a developer is working on a single microservice on his local macbook he will redirect the outbound traffic into the cloud instead of the local minikube. but this solution will create new problems:

  1. how a pod inside the cloud dev env will send data to the local developer machine? its not just a single request/response scenario

  2. We have many developers, they can overlap each other with different versions of each service they need to be deploy on the cloud. (We can set each developer separate namespace but we will need a huge cluster to support it)

The second solution was maybe we should use a tools like skaffold or draft to deploy our current code into the cloud development environment. that will solve issue #1 but again we see problems:

  1. Slow development cycle - building a java image and push to remote cloud and wait for init will take too much time for developer to work.

And we still facing issue #2

Antoher though was, kubernetes support multiple nodes, why won't we just add another node, a remote node that sit on the cloud, to our local minikube? The main issue is that minikube is a single node solution. Also, we didn't find any resources for it on the web.

Last thought was to connect minikube docker daemon to a remote machine. so we will use minikube on the local machine but the docker will run the containers on a remote cloud server. But no luck so far, minikube crush when we do this manipulate. and we didn't find any resources for it on the web as well.

Any thought how to solve our issue? Thank you!

-- user1748429
jvm
kubernetes
microservices
minikube
out-of-memory

0 Answers