Sidebar

How to open port in Kubernetes for a new channel?

0 votes
118 views
asked Sep 3, 2020 by ben-s-7515 (10,820 points)
I have a new HTTP receiver listening on a new port.  I am running QIE in a Kubernetes environment.  When I start the channel, it shows as running, but I am unable to connect to the channel.  How do I get the channel configured so that I can use it in my kuberentes environment?

1 Answer

+1 vote

When running QIE in a contaner using Kubernetes as the orchestrator (or Docker-Compose), you need to open the port in 2 places.  In this example, we will assume that two receivers are setup to listen on port 20001 and 20002.

First, you will need to configure the port that the new channel is listening on inside of your Kubernetes deployment YAML file.  Under the "container" section, you will have the ports defined.  You should always have a console-port defined, and under the console-port you will add the ports that you want exposed to the Kubernetes POD. 

ports:
  - name: console-port
    containerPort: 80
  - name: secure-port
    containerPort: 443
  - name: rec-20001
    containerPort: 20001
  - name: rec-20002
    containerPort: 20002

NOTE: Kubernetes does not allow for a port range to be specified, so each port must be specified in the YAML file individually.


Finally, any ports that have been exposed to the POD's must be added to the network service.  You will need to add the ports listed in the Kubernetes deployment configuration to the Kubernetes service configuration YAML file also.  The service creates the network layer to route the inbound traffic to the appropriate POD's, and in turn to the appropriate containers.  In the service configuration there will be a 'ports' definition under the 'spec'.  You will add your ports to this list.

spec:
  type: LoadBalancer
  ports:
    - name: console-port
      port: 80 # NOTE you can expose port 8080 on the network layer and route it to port 80 on the POD.  Then the user would browse to port 8080 instead of 80
      targetPort: 80
    - name: secure-port
      port: 443
    - name: rec-20001
      port: 20001
    - name: rec-20002
      port: 20002


Once bolth places have been updated, and the kubernetes deployment applied, you will be able to connect to your new HTTP receiver that you have setup.

answered Sep 3, 2020 by ben-s-7515 (10,820 points)
...