Skip to main content

The complete guide to running Java in Docker and Kubernetes

4h 39m 16s
English
Paid

Unlock the full potential of your Java applications in Docker and Kubernetes environments with our comprehensive course.Master the skills necessary to effectively run, optimize, and maintain JVM applications in production-ready settings. Although examples are based on Java, all concepts are applicable to any JVM language like Scala, Groovy, and Kotlin.

Introduction to Docker and Kubernetes

Before diving into advanced topics, we begin with an in-depth introduction to Docker and Kubernetes. You will gain foundational knowledge that is critical for understanding and effectively working within these environments.

Core Concepts Covered

  • In-depth understanding of what a container is under the covers

  • Exploration of Linux cgroups

  • Insights into Linux namespaces

JVM Behavior in Kubernetes

Explore how the JVM and your Java applications behave differently within Kubernetes, especially when utilizing cgroups and namespaces.

Key Topics Include

  • JVM ergonomics and adjustments

  • Understanding how CPU Shares and Quota function

  • The mechanics of Kubernetes' CPU and Memory management

Building Production-Ready Images

Learn the essential techniques to build images that are robust for a production environment.

Topics in Image Creation

  • Choosing a suitable base image

  • Differences between JDK and JRE based images

  • Utilizing multi-stage Docker builds

  • Implementing GraalVM

  • Incorporating class data sharing

  • Leveraging ahead-of-time compilation

We will also conduct experiments with various JVM versions and configurations to understand their impact.

Course Outcomes

By the conclusion of this course, you will possess the skills to:

  • Create a production-ready container image

  • Make informed choices about CPU limits, quotas, or utilizing both in Kubernetes

  • Define memory limits and optimize the JVM for Kubernetes

  • Comprehend and analyze CPU usage in Kubernetes compared to VMs and physical machines

About the Author: udemy

udemy thumbnail
By connecting students all over the world to the best instructors, Udemy is helping individuals reach their goals and pursue their dreams. Udemy is the leading global marketplace for teaching and learning, connecting millions of students to the skills they need to succeed. Udemy helps organizations of all kinds prepare for the ever-evolving future of work. Our curated collection of top-rated business and technical courses gives companies, governments, and nonprofits the power to develop in-house expertise and satisfy employees’ hunger for learning and development.

Watch Online 31 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 31 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: What you'll learn in this course
All Course Lessons (31)
#Lesson TitleDurationAccess
1
What you'll learn in this course Demo
01:33
2
What is Docker
13:17
3
Installing Docker
05:01
4
Docker components
09:12
5
Gradle and the samples
11:45
6
JVM Ergonomics
07:01
7
Introduction to namespaces and cgroups
14:16
8
Container CPU shares
14:59
9
Container CPU quota
12:51
10
Container memory
12:06
11
Kubernetes introduction
16:22
12
Installing minikube
08:08
13
Running the samples in Kubernetes
13:04
14
Kubernetes resources
05:58
15
CPU in Kubernetes
08:38
16
Memory in Kubernetes
03:28
17
Liveness, readiness, and rolling deployments
07:54
18
Introduction to images
01:55
19
Picking a base image
09:37
20
JDK vs JRE base image
05:46
21
Multi stage builds
12:16
22
JVM modules and JLink
10:26
23
Graceful shutdown and handling signals
15:00
24
Handling signals in containers
06:04
25
Debugging inside containers
07:59
26
Speeding up startup with Class Data Sharding (CDS)
09:18
27
Going distroless: in search of smaller images
09:20
28
Lightning fast containers with Ahead Of Time (AOT) compilation
08:16
29
GraalVM native image introduction
09:21
30
GraalVM multi stage builds
07:35
31
Questions and feedback
00:50
Unlock unlimited learning

Get instant access to all 30 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription