Steps

ARTIFACTORY: How to change the JVM in a running Artifactory Kubernetes release

AuthorFullName__c
Paul Pan
articleNumber
000005292
ft:sourceType
Salesforce
FirstPublishedDate
2022-05-27T08:00:41Z
lastModifiedDate
2022-05-27
VersionNumber
3
1. Download the JDK archive that you would like to use. ( For example, adoptopenjdk is available here https://staging.adoptopenjdk.net/17/archive.html)

2. Cp the download archive to artifactory pod ( note my pod name here is d-artifactory-0, we copied to /opt/jfrog/artifactory/var path because it’s persisted. You can create a directory under it to store the run time):
kubectl cp OpenJDK.tar.gz d-artifactory-0:/opt/jfrog/artifactory/var

3. Untar the java runtime inside pod. Repeat for each node.

4. Edit system.yaml to change javaHome:
shared:
  javaHome: "/opt/jfrog/artifactory/var/jdk-11.0.10+9"
You can do this by changing values.yaml and helm update the releases. Or you can directly modify the secret if you only want to quickly test the JVM change.
$ kubectl get secret d-artifactory-systemyaml -o jsonpath="{.data}"

         Base64 decode it to get the systemYaml content and change javaHome

         Encode the value again.  Run   

         $ kubectl edit secret d-artifactory-systemyaml

To replace the encoded string.

5. Perform a rolling restart on each pod. At start up, you should see:
2022-05-16T22:01:49.459Z [shell] [INFO ] [] [systemYamlHelper.sh:522       ] [main] - Resolved .artifactory.database.maxOpenConnections (80) from /opt/jfrog/artifactory/var/etc/system.yaml
2022-05-16T22:01:49.854Z [shell] [INFO ] [] [systemYamlHelper.sh:522       ] [main] - Resolved .access.database.maxOpenConnections (80) from /opt/jfrog/artifactory/var/etc/system.yaml
2022-05-16T22:01:50.149Z [shell] [INFO ] [] [systemYamlHelper.sh:522       ] [main] - Resolved .shared.javaHome (/opt/jfrog/artifactory/var/jdk-11.0.10+9) from /opt/jfrog/artifactory/var/etc/system.yaml
2022-05-16T22:01:52.014Z [shell] [INFO ] [] [installerCommon.sh:1514       ] [main] - Checking open files and processes limits
2022-05-16T22:01:52.074Z [shell] [INFO ] [] [installerCommon.sh:1517       ] [main] - Current max open files is 1048576
If you wish the persist this change at bootstrap, and your pod has access to internet, you can use the preStartCommand in values.yaml to load the extra java runtime:
artifactory:
  preStartCommand: "wget -c <uri> -O - | tar -xz -C /opt/jfrog/artifactory/var”