From 7d8b3e0ecf64fe387dc540e945f3986347fccde2 Mon Sep 17 00:00:00 2001 From: Nina Hingerl <76950046+NHingerl@users.noreply.github.com> Date: Tue, 31 Oct 2023 14:32:58 +0100 Subject: [PATCH] move doc to NATS repo (#209) * move doc to NATS repo * adjust sidebar --- docs/user/10-nats-server-system-events.md | 26 +++++++++++++++++++++++ docs/user/_sidebar.md | 8 +++---- 2 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 docs/user/10-nats-server-system-events.md diff --git a/docs/user/10-nats-server-system-events.md b/docs/user/10-nats-server-system-events.md new file mode 100644 index 00000000..a23fab43 --- /dev/null +++ b/docs/user/10-nats-server-system-events.md @@ -0,0 +1,26 @@ +# Acquiring NATS server system account credentials + +## Context + +Accessing certain resources in NATS requires [`system_account` privileges](https://docs.nats.io/running-a-nats-service/configuration/sys_accounts). Kyma automatically generates a `system account` user using a Secret dubbed `eventing-nats-secret` in the `kyma-system` Namespace. + +## Procedure + +To acquire the credentials, run the following command: + +```bash +kubectl get secrets -n kyma-system eventing-nats-secret -ogo-template='{{index .data "resolver.conf"|base64decode}}'| grep 'user:' | tr -d '{}' +``` + +### Result: +You get the credentials for the `system account` user in the following format: +```bash +user: admin, password: +``` +### Next steps: +1. To access the NATS server with the [nats-cli tool](https://github.com/nats-io/natscli), forward its port: + ```bash + kubectl port-forward -n kyma-system svc/eventing-nats 4222 +2. To send your NATS commands, pass the credentials: + ```bash + nats server info --user admin --password diff --git a/docs/user/_sidebar.md b/docs/user/_sidebar.md index c16c3bb3..31ae5e59 100644 --- a/docs/user/_sidebar.md +++ b/docs/user/_sidebar.md @@ -1,4 +1,4 @@ -- [Home](/) -- [NATS Manager](README.md) -- [Module Lifecycle](01-manager.md) -- [Module Configuration](02-configuration.md) +- [NATS Manager](/docs/user/README.md) +- [Module Lifecycle](/docs/user/01-manager.md) +- [Module Configuration](/docs/user/02-configuration.md) +- [Acquiring NATS server system account credentials](10-nats-server-system-events.md) \ No newline at end of file