splunk / splunk-operator

Splunk Operator for Kubernetes
Other
209 stars 115 forks source link

Topology overview question #1062

Closed adamrushuk closed 1 year ago

adamrushuk commented 1 year ago

Please select the type of request

Bug

Tell us more

Describe the request

Expected behavior

Splunk setup on K8S

Reproduction/Testing steps

apiVersion: enterprise.splunk.com/v4
kind: LicenseManager
metadata:
  name: lm-example
  finalizers:
    - enterprise.splunk.com/delete-pvc
spec:
  volumes:
    - name: licenses
      configMap:
        name: splunk-licenses
  licenseUrl: /mnt/licenses/enterprise.lic
  monitoringConsoleRef:
    name: mc-example
---
apiVersion: enterprise.splunk.com/v4
kind: ClusterManager
metadata:
  name: cm-example
  finalizers:
    - enterprise.splunk.com/delete-pvc
spec:
  licenseManagerRef:
    name: lm-example
  monitoringConsoleRef:
    name: mc-example
  defaults: |-
    splunk:
      set_search_peers: false
---
apiVersion: enterprise.splunk.com/v4
kind: IndexerCluster
metadata:
  name: idxc-example
  finalizers:
    - enterprise.splunk.com/delete-pvc
spec:
  replicas: 3
  clusterManagerRef:
    name: cm-example
  licenseManagerRef:
    name: lm-example
  monitoringConsoleRef:
    name: mc-example
---
apiVersion: enterprise.splunk.com/v4
kind: MonitoringConsole
metadata:
  name: mc-example
  finalizers:
    - enterprise.splunk.com/delete-pvc
spec:
  defaults: |-
    splunk:
      set_search_peers: false
---
apiVersion: enterprise.splunk.com/v4
kind: Standalone
metadata:
  name: sh-example
  finalizers:
    - enterprise.splunk.com/delete-pvc
spec:
  clusterManagerRef:
    name: cm-example
  licenseManagerRef:
    name: lm-example
  monitoringConsoleRef:
    name: mc-example
---
apiVersion: enterprise.splunk.com/v4
kind: Standalone
metadata:
  name: hwf-example
  finalizers:
    - enterprise.splunk.com/delete-pvc
spec:
  extraEnv:
    - name: SPLUNK_ROLE
      value: "splunk_heavy_forwarder"
  clusterManagerRef:
    name: cm-example
  licenseManagerRef:
    name: lm-example
  monitoringConsoleRef:
    name: mc-example
  defaults: |-
    splunk:
      set_search_peers: false
---
apiVersion: enterprise.splunk.com/v4
kind: Standalone
metadata:
  name: deployment
  finalizers:
    - enterprise.splunk.com/delete-pvc
spec:
  extraEnv:
    - name: SPLUNK_ROLE
      value: "splunk_deployment_server"
  clusterManagerRef:
    name: cm-example
  licenseManagerRef:
    name: lm-example
  monitoringConsoleRef:
    name: mc-example
  defaults: |-
    splunk:
      set_search_peers: false

K8s environment

Additional context(optional)

kashok-splunk commented 1 year ago

Hi @adamrushuk, I'll try to break the question into 2 parts:

  1. the Cluster Manager and Monitoring Console shows as Search Heads, As per Splunk documentation since Monitoring Console has been hosted on an instance other than Cluster Manager, MC is added as a search head to the CM. Also, CM is added as a search peer to the MC, so we see multiple SH here.
  2. License Manager shows as an Indexer Since License Manager is not connected to the indexing cluster then its role should be license master and indexer (indexing its own logs)

Please let us know if you have any further questions

adamrushuk commented 1 year ago

Thanks for the explanation @kashok-splunk - I wanted to ensure that behaviour was expected. I'll close the ticket now :)