splunk / splunk-operator

Splunk Operator for Kubernetes
Other
210 stars 115 forks source link

Splunk Operator/Standalone not working with Apps (asking for Java) #1287

Closed bepink1 closed 8 months ago

bepink1 commented 9 months ago

Please select the type of request

Bug

Tell us more

Describe the request I deployed Splunk Operator for Kubernetes via a Helm Chart on a EKS cluster. It looks like it works okay and I see the pods running.

I wanted to stand up a Standalone and install DB connect and RedShift JDBC DB connect to the pod, which I was also able to do. However, when I try to connect my Redshift DB, I get issues about JAVA_HOME not being set

The installation of DB Connect and the JDBC Drivers work, but we get errors.

Expected behavior Ideally, I'd like to connect to my Redshift cluster via the UI/DB Connect App

Splunk setup on K8S For reference, I have a file standalone.yaml with the contents:

apiVersion: enterprise.splunk.com/v4
kind: Standalone
metadata:
  name: s1
  finalizers:
  - enterprise.splunk.com/delete-pvc
spec:
  defaults: |-
    splunk:
      apps_location:
        - <location to db connect tar file>
        - <location to redshift jdbc tar file>

and then I run kubectl apply -f standalone.yaml -n splunk-system

Then, I execute kubectl port-forward <pod_name> 8000 -n splunk-system to access the UI

Reproduction/Testing steps Setup a new Cluster Install splunk-operator install splunk-standalone port forward standalone install db-connect via Web-UI / Or download and install from file

Proposed changes(optional) I saw that there is a splunk image here: https://hub.docker.com/layers/splunk/splunk/9.0.1-openjdk11/images/sha256-c3c608300b6291c37515b4d94aa188e287e75f7da0c48572cc8e8bb84b0e6a3f?context=repo that includes OpenJDK11? How can I go about using that image to build the standalone instead of what comes out of the box here (is this the route I should even be taking)?

Additional context(optional)

akondur commented 9 months ago

Hey @bepink1 , what version of Splunk Operator/Splunk Enterprise docker image are you using? Each Splunk Operator version is compatible with certain Splunk Enterprise versions as mentioned in each release. If any of the openjdk tags here is a compatible version, can you try using the same?

bepink1 commented 8 months ago

Hey @bepink1 , what version of Splunk Operator/Splunk Enterprise docker image are you using? Each Splunk Operator version is compatible with certain Splunk Enterprise versions as mentioned in each release. If any of the openjdk tags here is a compatible version, can you try using the same?

I was using v2.5.0 of the Splunk Enterprise Helm Chart. It looks like one of the main issues was that I should've been using a Splunk Operator Helm chart instead. I was then able to use the yaml file:

splunkOperator:
    # Set storageClassName for the PersistentVolumeClaim
    persistentVolumeClaim:
        storageClassName: gp2
image:
    repository: docker.io/splunk/splunk:9.0.1-openjdk11

(I had to the bit about the persistentVolumeClaim because of a Kubernetes error I was seeing). Doing this allowed me to get an image of Java up and running. Should be good now!