Acquiring NATS server system account credentials


Accessing certain resources in NATS requires system_account privileges. Kyma automatically generates a system account user using a Secret dubbed eventing-nats-secret in the kyma-system Namespace.


To acquire the credentials, run the following command:

Click to copy
kubectl get secrets -n kyma-system eventing-nats-secret -ogo-template='{{index .data "resolver.conf"|base64decode}}'| grep 'user:' | tr -d '{}'


You get the credentials for the system account user in the following format:

Click to copy
user: admin, password: <your password>

Next steps:

  1. To access the NATS server with the nats-cli tool, forward its port:
    Click to copy
    kubectl port-forward -n kyma-system svc/eventing-nats 4222
  2. To send your NATS commands, pass the credentials:
    Click to copy
    nats server info --user admin --password <your password>