Skip to content

Commit

Permalink
move doc to NATS repo (#209)
Browse files Browse the repository at this point in the history
* move doc to NATS repo

* adjust sidebar
  • Loading branch information
NHingerl authored Oct 31, 2023
1 parent 66f0d5e commit 7d8b3e0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
26 changes: 26 additions & 0 deletions docs/user/10-nats-server-system-events.md
Original file line number Diff line number Diff line change
@@ -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: <your 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 <your password>
8 changes: 4 additions & 4 deletions docs/user/_sidebar.md
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 7d8b3e0

Please sign in to comment.