Firewall requirements for Splunk and Kubernetes communication
When the Splunk App for Data Science and Deep Learning (DSDL) integrates with Kubernetes, you must ensure that the necessary ports are open to allow communication between the Splunk search head, the Kubernetes environment, and DSDL services. These firewall rules help data flow securely and efficiently, especially when containers are dynamically assigned ports at runtime in development (DEV) mode.
In production (PROD) mode, fewer ports are exposed, typically limiting external access to only the required endpoints. In DEV mode, additional ports for Jupyter, TensorBoard, MLflow, and Spark can be opened for interactive development.
Kubernetes firewall rules summary
Use this summary to confirm required, recommended, or optional ports. Adjust for your specific environment and security policies:
Component | Required? | Port | Description |
---|---|---|---|
Kubernetes API | Yes | 6443 | Required for Splunk to manage pods. |
Splunk REST API | No | 8089 | Optional if container-based calls to Splunk are needed. |
DSDL API | Yes | 5000 or dynamic | Required for training and inference commands. |
Splunk HEC | No | 443 or 8088 | Optional if streaming data or logs back into Splunk. |
Jupyter | No | 8888 | Used in DEV mode or specific workflows; open only if needed. |
MLflow | No | 6060 | Used in DEV mode or specific workflows; open only if needed. |
Spark | No | 4040 | Used in DEV mode or specific workflows; open only if needed. |
TensorBoard | No | 6006 | Used in DEV mode or specific workflows; open only if needed. |
Firewall configuration for the Splunk search head
See the following table for information on traffic direction and port requirements for the Splunk search head:
Traffic direction | Port | Required? | Description |
---|---|---|---|
Outbound | 6443 | Required for Kubernetes use. | Kubernetes API server. Manage pods, resources. |
Bidirectional | 8089 | Optional. Needed if containers call back to Splunk using REST. | Splunk REST API communication with containers. |
Bidirectional | 5000 or dynamic | Required for DSDL operations. | DSDL API commands including fit , apply , and summary .
|
Inbound | 8088 for on-premises or 443 for Splunk Cloud. | Optional if using HEC ingestion. | Splunk HEC for receiving data from containers. |
See the following table for further information on Splunk ports:
Port | Description |
---|---|
Kubernetes API port |
|
Splunk management port |
|
DSDL API port |
|
Splunk HEC port |
|
Firewall configuration for the machine running Kubernetes
See the following table for information on traffic direction and port requirements for the machine running Kubernetes:
Traffic direction | Port | Required? | Description |
---|---|---|---|
Bidirectional | 8089 | Optional. Use if needed for container communication to the Splunk REST API. | REST API communication with Splunk. |
Bidirectional | 5000 or dynamic | Required for DSDL operations. | DSDL API commands with Splunk. |
Outbound | 443 for Splunk Cloud or 8088 for Splunk on-premises. | Optional. Use for HEC ingestion. | HEC for sending data to Splunk. |
Inbound | 6443 | Required to manage cluster resources. | Kubernetes API access from Splunk. |
Inbound | 8888 or dynamic | Required in DEV if Jupyter is used. | Jupyter Notebooks (DEV mode). |
Inbound | 6060 or dynamic | Optional. Use with MLflow. | MLflow tracking (DEV mode). |
Inbound | 4040 or dynamic | Optional. Use with Spark. | Spark monitoring (DEV mode). |
Inbound | 6006 or dynamic | Optional. Use with TensorBoard. | TensorBoard (DEV mode). |
See the following table for further information on both Splunk and service ports:
Port | Description |
---|---|
Splunk management port |
|
DSDL API port |
|
Splunk HEC port |
|
Kubernetes API port |
|
Optional Services (DEV Mode) |
|
Development versus production usage
See the following table for firewall usage in development (DEV) versus production (PROD) mode:
Mode | Description |
---|---|
Development (DEV) mode |
|
Production (PROD) mode |
|
Next steps
Complete the following steps after completing the steps in the previous sections:
- Align ports with your environment:
- Verify which ports your containers actually use by checking the DSDL user interface or logs.
- Update firewall rules to cover both default and dynamically assigned ports.
- Implement network security best practices:
- Restrict ports to trusted networks where possible.
- Enable TLS (especially for Kubernetes in production) to safeguard data in transit.
- Limit the container's inbound connectivity if you only need to push data out to Splunk.
- Monitor and test:
- After configuring your firewall, run test searches, attempt container connections, and confirm that data can flow in both directions as needed.
- For ongoing monitoring, leverage Splunk Observability, container logs, and standard Splunk dashboards to ensure stable communication.
Firewall requirements for Splunk and Docker communication | Leverage the examples provided in the Splunk App for Data Science and Deep Learning |
This documentation applies to the following versions of Splunk® App for Data Science and Deep Learning: 5.2.0
Feedback submitted, thanks!