- Adapt the persistence class in your nats-values.yaml
- Deploy NATS to the cluster in the NATS namespace
helm repo add nats https://nats-io.github.io/k8s/helm/charts/
helm --kube-context <context> --namespace nats --install --create-namespace upgrade nats nats/nats --version 1.1.12 -f nats-values.yaml
- If there were already kvstores, you may need to delete them, they are automatically recreated:
nats kv rm <kvstorename> -f
- Deploy the nats-test by applying the
deploy.yml
file:kubectl --context <context> apply -f deploy.yml
- Scale the nats-test deployment and the restart-nats-statefulset to 1
- Monitor the output of the nats-test pod, as soon as it is out of sync, it will show the Message "KEY NOT FOUND: ..."
- Stop the test by scaling the nats-test deployment and the restart-nats-statefulset to 0
- Check issue by opening the nats-box and using the following command multiple times
nats kv ls testkv --trace
- Output should sometimes be
Key1
and sometimesNo keys found in bucket