apiVersion: v1 kind: Service metadata: name: splunk-service namespace: splunk-namespace spec: selector: app: splunk-server ports: - name: splunk-web protocol: TCP port: 8000 targetPort: 8000 nodePort: 30000 - name: splunk-management protocol: TCP port: 8089 targetPort: 8089 nodePort: 30089 - name: splunk-indexing protocol: TCP port: 9997 targetPort: 9997 nodePort: 30997 - name: splunk-hec protocol: TCP port: 5144 targetPort: 5144 nodePort: 30144 - name: splunk-hec-ssl protocol: TCP port: 5145 targetPort: 5145 nodePort: 30145 - name: splunk-syslog protocol: TCP port: 5146 targetPort: 5146 nodePort: 30146 type: NodePort # Expose the service via NodePort