A Busy Developer's Guide to Microservices on Kubernetes and Docker
If you're using fabric8, here are a few resources for you to learn how you can quickly bring in Kubernetes and Docker to enhance your microservices.
Join the DZone community and get the full member experience.Join For Free
As a Java developer, he shows how you can get started with a Kubernetes cluster with a single Maven command, that downloads and install the binaries. While it's doing that, you can go fetch a cup of coffee and relax.
And don't worry, the installation is local and installing in your home directory under .fabric8. So at the end of the day, you can just delete it all, and it's gone — no uninstall procedure or anything like that.
It has never been that easy to just, from Maven, run:
It will build and deploy your application in the cluster and then tail the log. And when you are done, just press ctrl + c to break, and the app is undeployed.
Oh, bugger, there is a bug in the code somewhere. How do I debug this when the application runs in the cluster and my Java IDE is running on my computer/laptop? Well behold, just run:
And you can attach a remote debugger from your Java IDE.
Okay, I don't want to steal more of James' thunder. Now head over and read his blog piece and make sure also to watch the video at the end. Christian Posta demonstrates all this.
PS: The next thing we are working on is a fabric8:watch so you can do live code changes in your running containers without a full redeploy. There are still a few things to iron out to make it work well, but we are getting very close.
Opinions expressed by DZone contributors are their own.