- Expose a workload
- Expose and secure a workload
- Security
Acquiring NATS server system account credentials
Context
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.
Procedure
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 '{}'
Result:
You get the credentials for the system account
user in the following format:
Click to copy
user: admin, password: <your password>
Next steps:
- To access the NATS server with the nats-cli tool, forward its port:Click to copykubectl port-forward -n kyma-system svc/eventing-nats 4222
- To send your NATS commands, pass the credentials:Click to copynats server info --user admin --password <your password>