NATS on Kubernetes example

In a previous blog, you saw an example of NATS along with producer and consumer – based on Docker Compose. This post uses the same app, but runs on Kubernetes


For how to run, follow the README on Github

High level overview

  • uses the NATS Kubernetes operator
    • it seeds a CRD …
    • … using which we can spawn a NATS cluster on Kubernetes (with a single command!)
    • A Service object is created automatically – uses ClusterIP by default

NATS Kubernetes Service object

  • The environment variable corresponding to the Serviceis used in the application logic to locate NATS server. Note its usage here




About Abhishek

Loves Go, NoSQL DBs and messaging systems
This entry was posted in Distributed systems, Kubernetes, nats and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.