Skip to main content
CF

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

Udemy is the largest open marketplace for online courses on the internet. Founded in 2010 by Eren Bali, Oktay Caglar, and Gagan Biyani and headquartered in San Francisco, the company went public on the Nasdaq in 2021 under the ticker UDMY. The platform hosts well over two hundred thousand courses across software development, IT and cloud, data science, design, business, marketing, and creative skills, taught by tens of thousands of independent instructors. Roughly seventy million learners use it worldwide, and the corporate arm — Udemy Business — supplies a curated subset of that catalog to enterprise customers.

Because Udemy is a marketplace rather than a single editorial publisher, the catalog is uneven by design. The strongest material lives in the long-form, project-based courses authored by working engineers — full-stack JavaScript, React, Node.js, Python data science, AWS, Docker and Kubernetes, mobile development with Flutter and React Native, and cloud certification preparation. The CourseFlix listing under this source is the slice of that catalog that has been mirrored here for offline-friendly viewing, organized by topic and updated as new releases land. Pricing on Udemy itself swings dramatically with the site's near-permanent sales, which is why the platform is best treated as a deep reference catalog: pick instructors with strong reviews and a track record of updating their material rather than buying on the headline price alone.

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

Related courses

Frequently asked questions

What prerequisites are needed for this course?
Prospective students should have a foundational understanding of Java programming and related JVM languages like Scala, Groovy, or Kotlin. Familiarity with basic Linux commands and concepts will be helpful, as the course covers topics like Linux cgroups and namespaces. Prior experience with containerization or Docker is not mandatory, as the course begins with an introduction to Docker and Kubernetes.
What projects or applications will I build in this course?
Throughout the course, students will build production-ready Docker images and run sample Java applications in Kubernetes environments. The course includes hands-on exercises such as picking a base image, creating multi-stage builds, and implementing GraalVM for native images. These projects will enhance your skills in deploying and managing Java applications in containerized settings.
Who is the target audience for this course?
This course is designed for Java developers and software engineers looking to optimize their applications for containerized environments. It's also suitable for DevOps professionals interested in understanding how Java applications behave in Docker and Kubernetes. The course is beneficial for anyone aiming to enhance their skills in deploying and maintaining JVM applications in modern infrastructure settings.
How does the course depth compare to other Java and Docker courses?
This course offers a focused exploration of running Java applications in Docker and Kubernetes, emphasizing JVM-specific optimizations like ergonomics and GraalVM integration. Unlike general Docker courses, it delves into JVM behavior, including CPU and memory management with cgroups and Kubernetes. The course provides specific insights into building robust production images, making it more specialized for JVM languages than broader containerization courses.
What specific tools and platforms are covered in this course?
The course covers Docker and Kubernetes as primary platforms for containerization. Tools and concepts include Linux cgroups, namespaces, GraalVM for native image creation, and Kubernetes management of CPU and memory resources. Students will work with tools like minikube for local Kubernetes deployment and explore techniques like multi-stage Docker builds and class data sharing.
What topics are not covered in this course?
The course does not cover non-JVM languages or broader cloud orchestration tools beyond Kubernetes. It focuses on Java and JVM optimizations within container environments, so it does not delve into other programming languages or non-containerized deployment strategies. Advanced Kubernetes topics beyond CPU and memory management, such as network policies or custom resource definitions, are also not addressed.
What is the estimated time commitment for completing this course?
The course consists of 31 lessons, but the total runtime is not specified. Given the comprehensive nature of the topics, including practical exercises, students should plan for a substantial time commitment to fully absorb the material. The time required will vary based on individual learning pace and prior experience with Java, Docker, and Kubernetes.