github.com/pachyderm/pachyderm@v1.13.4/etc/kubernetes-kafka/5outside-services/README.md (about)

     1  ## Expose Kafka outside cluster
     2  
     3  Currently supported for brokers, not zookeeper.
     4  
     5  
     6  ### Outside access with one nodeport per broker
     7  outside-0.yml - outside2.yml creates sample services for NodePort access, i.e. inside any firewalls that protect your cluster. Can be switched to LoadBalancer, but then the init script for brokers must be updated to retrieve external names. See discussions around https://github.com/Yolean/kubernetes-kafka/pull/78 for examples.
     8  
     9  When using this approach a service must be created for each kafka broker.
    10  
    11  ### Outside access with hostport
    12  An alternative is to use the hostport for the outside access. When using this only one kafka broker can run on each host, which is a good idea anyway.
    13  
    14  In order to switch to hostport the kafka advertise address needs to be switched to the ExternalIP or ExternalDNS name of the node running the broker.
    15  in [kafka/10broker-config.yml](../kafka/10broker-config.yml) switch to
    16  * `OUTSIDE_HOST=$(kubectl get node "$NODE_NAME" -o jsonpath='{.status.addresses[?(@.type=="ExternalIP")].address}')`
    17  * `OUTSIDE_PORT=${OutsidePort}`
    18  
    19  and in [kafka/50kafka.yml ](../kafka/50kafka.yml) add the hostport:
    20  ```        
    21          - name: outside
    22            containerPort: 9094
    23            hostPort: 9094
    24  ```