-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3717 from brunoborges/master
Better recommendation about JDK and cgroups
- Loading branch information
Showing
1 changed file
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
# Revert Kubernetes 1.25 to cgroup v1 | ||
|
||
JDK 10 introduced ```UseContainerSupport``` which provided support for running Java applications within containers. | ||
As cgroup v2 is GA in 1.25+, and is also the default on Ubuntu 22.04, customers may have to downgrade to cgroups v1 due to compatibility issues with older software. | ||
|
||
The Java runtime will use the cgroup filesystem to understand the memory and cpu availability. | ||
To perform a cgroups version downgrade on your nodes, use this [Daemonset](./revert-cgroup-v1.yaml). | ||
|
||
With the introduction of cgroup v2, the location of these files has changed and Java applications prior to JDK 15 will exhibit significant memory consumption which may make your environments unstable. | ||
## Important note | ||
|
||
As cgroup v2 is GA in 1.25, and is also the default on Ubuntu 22.04, customers should migrate their applications to JDK 15+. | ||
The Daemonset by default will apply to all nodes in your cluster and will reboot them to apply the cgroup change. Please set a nodeSelector to control how this gets applied. | ||
|
||
An alternative temporary solution is to revert the cgroup version on your nodes using this [Daemonset](./revert-cgroup-v1.yaml). | ||
## Java related issues | ||
|
||
If you observe memory issues with Java-based systems and products, you may have to update your JDK installation to a newer minor version that supports cgroups v2. | ||
|
||
* JDK 8: 1.8.0_372 or later | ||
* JDK 11: 11.0.18 or later | ||
|
||
## IMPORTANT NOTE | ||
|
||
The Daemonset by default will apply to all nodes in your cluster and will reboot them to apply the cgroup change. Please set a nodeSelector to control how this gets applied. | ||
If updating the JDK is not an option, an alternative is by downgrading to cgroups v1. |