Accessing topics from an application outside NAIS¶
This guide will show you how to access a Kafka topic from an application outside NAIS clusters.
Enable access to the relevant pool in your manifest¶
.nais/aivenapp.yaml
Info
The secretName must be a valid DNS label, and must be unique within the namespace.
Apply the AivenApplication¶
Add the file to your application repository, alongside nais.yaml
to deploy with NAIS github action.
Extract the value of the generated secret¶
kubectl get secret <MY-UNIQUE-SECRET-NAME> --namespace <MY-TEAM> --contect <MY-ENV> -o jsonpath='{.data}'
Make the values available to your application.
Grant access to the topic¶
The owner of the topic must grant your application access to the topic.