Deploying multiple containers on Kubernetes to use a ZeroMQ PUB/SUB

4/13/2020

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 instances

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 the code here : https://github.com/alhennessey92/zeromq-kubernetes-test I think it 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.

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.

-- Al Hennessey
google-kubernetes-engine
kubernetes
pyzmq
zeromq

0 Answers