- Copy the example yaml to a non-example yaml e.g.
cp values.example.mysql.yml values.mysql.yml
- Setup the connection string in the copied yaml to your needs
- Make sure, that the database is seeded with the official seeding query (MySQL / Postgres)
$ helm install --name nats --namespace nats-namespace ./chart -f values.mysql.yml
Best way to test it locally, port forward a pod:
$ export POD_NAME=$(kubectl get pods --namespace nats-namespace -l "app=nats-streaming,release=release-name" -o jsonpath="{.items[0].metadata.name}")
$ kubectl port-forward $POD_NAME 4222:4222
You can then start consumer and producer:
(consumer)
$ cd testconsumer
$ go mod tidy
$ go run main.go
(producer)
$ cd tesproducer
$ go mod tidy
$ go run main.go
Enter a message: