Enabling service ports for Streaming applications in Kubernetes

Enabling service ports for Streaming applications in Kubernetes

book

Article ID: KB0073362

calendar_today

Updated On:

Products Versions
TIBCO Streaming 10.x

Description

The default YAML configuration for a StreamBase Application project with both "Enable Docker support" and "Use Kubernetes for container orchestration" does not add any port setting to expose server ports.

Creating a TIBCO Streaming application project in StreamBase Studio:
SB Studio dialog for application project creation with Kubernetes selected

What is the additional YAML syntax needed to expose these ports?

Issue/Introduction

configuration guidance

Resolution

A Streaming server often has adapters that open service ports for direct access, LiveView tables, and StreamBase client connections.

The Kubernetes YAML configuration does not by default expose these ports because the application project does not know at the time it is created what service ports should be open.

The YAML configuration is found in the project here:
  /{project}/src/main/kubernetes/{project}-app.yaml

To expose these ports, add the " ports:" configuration to the container referencing the EventFlow fragment archive.

Example:
 ...     spec:       containers:         - name: streaming           image: mystreamingapp-docker:0.0.1-SNAPSHOT           # additional ports for provided services           ports:             - name: SB               containerPort: 10000             - name: LV               containerPort: 10080             - name: WEB               containerPort: 8080           # end of additional ports           volumeMounts: ...

These settings allow access to these ports between containers in the pod that share the same network.
The descriptive names can also be referenced in the Ingress or Load Balancer pod configuration to open these ports to the internet.

Additional Information

Declarative Management of Kubernetes Objects Using Configuration Files
https://kubernetes.io/docs/tasks/manage-kubernetes-objects/declarative-config/

AWS Load Balancer connection settings
https://docs.aws.amazon.com/eks/latest/userguide/load-balancing.html