Symptoms
When you view the Event Gateways in the Administration > Event Gateways page of the Event Endpoint Management UI, a warning is presented about insufficient hostnames for the gateway group.
Causes
The total number of hostnames for all gateways in a gateway group must be the same or greater than the total number of Kafka brokers that the gateway group serves topics from. If this requirement is not met, then your gateway group does not have enough unique hostnames to use for all the Kafka brokers.
If Event Endpoint Management detects that a gateway group might not have enough hostnames, then you see the warning.
Resolving the problem
If authors want to publish more virtual topics to the gateway group, then follow these steps to add more hostnames.
- Identify which gateways in the gateway group that you want to add new hostnames to.
- Edit the gateway configuration to add more hostnames.
If your gateway group has only a single Event Gateway, then Kafka clients might experience a loss of service while the Event Gateway restarts.
Operator-managed Event Gateways
Edit your EventGateway custom resource and increase the value that is set in spec.listener.{0}.groups.{0}.maxNumKafkaBrokers by the number of extra gateway hostnames that you require.
Restart the Event Gateway pod after you make this change.
Kubernetes Deployment Event Gateways
Edit the Event Gateway ConfigMap and set kafka.listener.{0}.group.{1}.addresses to include the extra gateway addresses that you require.
Update the SAN in the TLS certificate that secures your gateway to include the new hostnames.
For each new hostname, create a new Kubernetes Service and Ingress or OpenShift Container Platform route as described in creating the Kubernetes service.
Docker Event Gateways
Edit the backup of your docker run command and set KAFKA_LISTENER_LISTENER_GROUP_GROUP_ADDRESSES to include the extra gateway addresses that you require. Also, update the port mappings to include any new ports that you specify. For example: -p 9092:8443,9093:8444
If your new addresses include new hostnames, then add these hostnames to the SAN in the TLS certificate that secures your gateway.
Restart your docker Event Gateway by using the updated run command.