Deploying multiple Zeromq containers on Kubernetes

I am trying to run 2 containers on Google Kubernetes Engine, both running Zeromq using the pub/sub model to relay messages from one container to the other. I am developing on Visual Studio Code and using the Cloud Code plugin to deploy the containers to my remote cluster using scaffold. The GKE cluster consists of 3 nodes running e2-small When I deploy the containers they get seem to get deployed correctly, however in the output section I never see any of the logs showing that the messages are getting sent correctly as the code suggests they should.

Please find below the code I think is relevant to this issue as well as the final output logs from the terminal.

Final logs from terminal

Starting deploy…

  • service/test-dev-pub created
  • service/test-dev-sub created
  • deployment.apps/test-dev-pub created
  • deployment.apps/test-dev-sub created
    Deploy complete in 969.953727ms
    Waiting for Deployment ‘test-dev-pub’ to rollout…
    Port forwarding service/test-dev-pub in namespace default, remote port 5556 -> local port 5556
    Port forwarding service/test-dev-sub in namespace default, remote port 5556 -> local port 5557
    Watching for changes…
    Streaming logs from pod: test-dev-sub-84ccccbdc8-slnvr container: sub
    Streaming logs from pod: test-dev-pub-6f9b99bccf-t4q56 container: pub
    Waiting for Deployment ‘test-dev-sub’ to rollout…
    No publicly exposed service endpoints found in the application.
    No ingress endpoints found in the application.

You can find the GitHub repo below

I am not sure why this does not seem to be working as it should, I should be seeing the printed logs displaying from both the pub and sub containers, but am not.

Thanks for the help

Cluster information:

Cloud being used: GKE
Installation method: Cloud Code via Visual Studio Code

Looking at your kubernetes-manifests folder:

  1. You don’t need a service for your subscriber pod, nothing is going to initiate a connection to it
  2. Similarly you shouldn’t need to expose any ports on your subscriber pod
  3. Looking at your publisher service definition, currently the selector is going to connect to the subscriber pod, presumably you want this to connect to the publisher, so you should modify the selector to:
    app: test-dev
    tier: pub

Hope that helps