Create custom probe scripts

Customize Kubernetes probe scripts for Splunk Custom Resources.

Customize liveness, readiness, and startup probe scripts for Splunk Enterprise Custom Resources using a Kubernetes ConfigMap.

Overview

The default probe scripts ship in the tools/k8_probes/ directory. When a Custom Resource (CR) is created, the Splunk Operator creates a ConfigMap named splunk-<CR namespace>-probe-configmap.

Note:

Probe scripts must be used by all CRs in the same namespace. Different namespaces can have different probe scripts.

Edit the ConfigMap after automatic creation

When a CR is created for the first time, the operator automatically creates the ConfigMap with default scripts. You can then edit the data in that ConfigMap. The operator does not overwrite your changes.

Create the ConfigMap before deploying CRs

Before deploying CRs, manually create the ConfigMap with your custom scripts. All three scripts must be included: livenessProbe.sh, readinessProbe.sh, and startupProbe.sh. If you customize only one script, include the default content for the others.

Example command:

CODE
kubectl create configmap splunk-<CR namespace>-probe-configmap --from-file=livenessProbe.sh,readinessProbe.sh,startupProbe.sh -n <CR namespace>
Important:

The operator never overwrites existing ConfigMap data.