Deployment Architecture

Install java in search heads in kubernetes

shashank_trip
New Member

I am trying to install java on my splunk search head in kubernetes. As indicated in previous forums, I tried adding the JAVA_VERSION environment variable and set it to openjdk:8 but that does not seem to install java on my kubernetes pod. Can someone guide me to the steps to install java on my pod with the splunk:latest image?

I saw a few ansible scripts which installs java but not in the search head yaml found under https://github.com/splunk/docker-splunk/blob/develop/test_scenarios/kubernetes/3idx1sh1cm-pvc/splunk... which is what I have deployed in my cluster.

0 Karma

codebuilder
Influencer

You don't "install" java to a Docker container, you build it into the base OS image. If the image you're using does not contain java, then you'll need to update the Makefile and rebuild your image.

----
An upvote would be appreciated and Accept Solution if it helps!
0 Karma

shashank_trip
New Member

Thanks @codebuilder for your response. I am trying to set it up on kubernetes using the splunk/splunk:latest image and I tried setting the JAVA_VERSION env variable to "openjdk:11" but that does not seem to bake java into the image via ansible scripts. Any thoughts on what might be up there?

0 Karma

codebuilder
Influencer

Yes. Java is not installed on the Docker image you are using. Try another image or update the Makefile to include it, and rebuild the image.

----
An upvote would be appreciated and Accept Solution if it helps!
0 Karma

codebuilder
Influencer

There appear to have been some known issues on this topic as well, resolved with the Debian 10 image.

https://github.com/splunk/splunk-ansible/pull/244

----
An upvote would be appreciated and Accept Solution if it helps!
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...