Monday, February 24, 2025

NATS GUI in kubernetes

 


In this post we deploy NATS GUI in kubernetes.


NATS GUI is a very simple and nice tool to view NATS messages. Its deployment is also super simple. We include a service and a deployment.

The service:


apiVersion: v1
kind: Service
metadata:
name: natsgui-service
spec:
selector:
configid: natsgui-container
type: ClusterIP
ports:
- port: 80
targetPort: 31311
name: tcp-api
protocol: TCP


The deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
name: natsgui-deployment
spec:
replicas: 1
selector:
matchLabels:
configid: natsgui-container
template:
metadata:
labels:
configid: natsgui-container
spec:
containers:
- name: natsgui
image: ghcr.io/nats-nui/nui:latest
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /db
name: db
volumes:
- emptyDir: {}
name: db



That's all.

Now we can see the messages in queues. We can also use wildcards, for example:



Another nice feature is the ability to click on  the arrow (near the X to close window). This allows us to save the message details open while checking another message.





No comments:

Post a Comment