forge for fast build/deploy for kubernetes (with minikube)

Just came across a nice dev tool to build and deploy Docker’ized applications. A developer may want to independently build/deploy to a local docker container or another Kubernetes cluster vs. waiting for a remote CI/CD process to deploy to a dev environment. This involves some repetitive tasks such as building the binary, packaging into a Docker container, pushing to a Docker registry and all the way to deploying to a running container. If you run this often it can be a time suck for developers. takes away those repetitive steps and lets you build/deploy locally or to another cluster.

To get this setup run through following…

  1. Install and run Docker (of course) —
  2. Create a docker hub account —
  3. Install kubectl —
  4. Install minikube —
  5. Download sample project from or from my github repo —
  6. Install —

Build the maven project which generates a Spring Boot deployable jar.

mvn clean package
forge deploy

You should see forge build the docker image and deploy the service. The latest release skips image builds if there were no changes.To get the endpoint URL for the service on minikube…

$ minikube service --url quote-service

The URL above is what I got on my local machine. Yours will be different. Hit that URL with request path


You will get some random Chuck Norris joke in JSON format. The service goes out to a 3rd party API to get the jokes. If you dont see a joke then run it a couple of times (a bug).

To get the convenience of quick build/deploy you need to provide a few configuration files (hey nothing in life comes free).

  • service.yml — contains service metadata
  • forge.yml — connection information to your Docker registry (in my case docker hub). This file is sensitive to your account so I have not added it into my github project.
  • k8s/* — deployment templates provides a great overview at