I am trying to figure out the ultimate best practices for using Java in Docker containers deployed using Kubernetes on local environments or while developing code. In the ideal state, Java developers should be able to move as fast as python/javascript developers, but I am having a hard time matching the speed (or even coming close).
At the moment, I have a working, manually deployed k8's cluster. My Java Spring project is built by maven after a build command is run manually (mvn clean install
), then I run a script to make an image, after that I run a script to run minkube (if its not already running) and finally I have to apply
a deployments manifest file (which launches the containers into the pods).
What I am missing:
- All of this is done manually (there is clear room to automate the process of building an image after code is built and to have k8s update using the new image).
- Builds are manually specified (python relaunches on code save. No hot reloading to my knowledge in the java world).
- I have yet to see an integration between a local development environment and a cloud hosted k8's cluster. Ideally, a dev would test locally until they are ready to deploy to the cloud. When they are ready, it would be awesome to click a button and have a cluster read from a remote registry that could pick up the docker image changes and reload.
Sadly, Skaffold, the tool that I would be excited to use does not work natively with Java. Is there another tool that Java Devs are using to make their local deployments super fast and competitive with the DUCK languages (py, js)?