A Busy Developer's Guide to Microservices on Kubernetes and Docker

DZone 's Guide to

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.

· Cloud Zone ·
Free Resource

James Strachan blogged a few days ago about all the great work that has happened recently at the fabric8 project in terms of improving the developer experience with "kicking the tires," as I say it.

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:

mvn fabric8: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:

mvn fabric8:debug 

And you can attach a remote debugger from your Java IDE.

Remote debugging a running container in Kubernetes cluster from Java IDE editor

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.

Related Refcard:

cloud, docker, java, kubernetes

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}