The complete guide to running Java in Docker and Kubernetes
What you'll learn
- In depth knowledge of how Java works in a Container
- Kubernetes & Docker
- Containers in depth: Linux cgroups & namespaces
- How to build a production-quality Docker image for JVM applications
Requirements
- Basic Java is helpful but not mandatory. This course is applicable to any JVM language (Scala, Kotlin, Groovy, Clojure) though the samples are in Java.
Description
If you need to learn how to run, tune, and maintain JVM applications that run in Docker and/or Kubernetes then this is the course for you.
This course is very different from other Java/Docker/Kubernetes courses. It focuses on all the skills that you need to succeed in production.
All of the examples are in Java but the content is applicable for any JVM language including Scala, Groovy, and Kotlin.
We'll start with introductions for Docker and Kubernetes then we'll get into the fun stuff. We'll learn:
What a container is under the covers
Linux cgroups
Linux namespaces
Then we will go into how the JVM and your Java application behave differently in Kubernetes when running inside cgroups and namespaces. We'll cover:
JVM ergonomics
How CPU Shares and Quota work
How Kubernetes manages CPU and Memory
Then we will teach you all the techniques needed to build production-ready images:
Selecting a base image
JDK vs JRE based images
Multi-stage Docker builds
GraalVM
Class data sharing
Ahead of time compilation
We will experiment with different JVM versions and settings.
By the end of this course you'll know how to:
Build a production-ready image
Select between using CPU limits, quotas, or both in Kubernetes
Select memory limits and tune the JVM for running in Kubernetes
Understand CPU usage in Kubernetes and know why it is different to VMs and physical machines.
Who this course is for:
- JVM developers interested in understanding how the JVM behaves in a container
- Java developers using Docker
- Java developers using Kubernetes
- JVM developers using containers
Instructor
I first started running Kubernetes back in 2014 (before it was version 1.0) when I was part of a small devops team managing thousands of JVMs running in Kubernetes. During that time I contributed to Kubernetes and spent many hours debugging and tuning JVM applications in Kubernetes.
Since then I've worked full-time on Akka (a Java/Scala concurrency and distributed systems library) where part of my work has been to optimize it for running in Kubernetes.
In this course, I'll be teaching you what I had to learn the hard way.