Remotely connecting through Kubernetes to a JMX agent in a Spring Boot 1.x application to monitor an application

Tremaine Eto
cloud native: the gathering
6 min readOct 31, 2018

--

What‘s JMX, Kubernetes, and Spring Boot?

The Java Management Extensions (JMX) technology is a Java standard and allows for a means of monitoring and managing resources–most notably the Java Virtual Machine (JVM).

A resource is instrumented with Managed Beans (MBeans) that are registered in a core-managed MBean server which can run on devices that have the Java programming language installed.

Kubernetes is an open-source container-based system that automates deployments, scaling, and general container management. In a use case relevant to this article, it can orchestrate Java applications that are deployed in Docker containers.

Spring Boot is a Java framework for running a Spring application to support stand-alone, production-grade applications. It includes features such as built-in annotations and embedded HTTP servers like Tomcat or Jetty.

What’s the problem?

As it turns out, connecting to a JMX agent locally through a JMX UI client is quite simple. Typically, the client is automatically aware of the application through its running .jar file and gives the user the option to connect to its…

--

--

Tremaine Eto
cloud native: the gathering

Senior Software Engineer @ Iterable | Previously worked at DIRECTV, AT&T, and Tinder | UCLA Computer Science alumni | Follow me for software engineering tips!