nats-kafka
by NATS
Helm chartv0.15.4App 1.4.2Verified publisher
A multi-connector bridge between NATS and Kafka.
About this chart
nats-kafka
TL;DR;
helm repo add nats https://nats-io.github.io/k8s/helm/charts/
helm install -f my-values.yaml my-nats-kafka nats/nats-kafka
Configuration
The following example configurations can be set with -f.
Basic
natskafka:
nats:
servers:
- "nats://1.2.3.4:4222"
connect:
- type: "NATSToKafka"
brokers:
- 1.2.3.4:9092
id: whizz
topic: bar
subject: bang
- type: "KafkaToNATS"
brokers:
- 1.2.3.4:9092
id: foo
topic: bar
subject: baz
Monitoring
natskafka:
monitoring:
httpPort: 8222
nats:
servers:
- "nats://1.2.3.4:4222"
connect:
- type: "NATSToKafka"
brokers:
- "1.2.3.4:9092"
id: whizz
topic: bar
subject: bang
- type: "KafkaToNATS"
brokers:
- "1.2.3.4:9092"
id: foo
topic: bar
subject: baz
Monitoring with TLS
First, create a secret in Kubernetes with certs and keys.
kubectl create secret generic monitor-tls \
--from-file=ca-cert.pem \
--from-file=user-key.pem \
--from-file=user-cert.pem
Then use the data in the secret in the configuration.
natskafka:
monitoring:
httpsPort: 8222
tls:
secret: monitor-tls
root: ca-cert.pem
cert: user-cert.pem
key: user-key.pem
nats:
servers:
- "nats://1.2.3.4:4222"
connect:
- type: "NATSToKafka"
brokers:
- "1.2.3.4:9092"
id: whizz
topic: bar
subject: bang
- type: "KafkaToNATS"
brokers:
- "1.2.3.4:9092"
id: foo
topic: bar
subject: baz
Using Nats Credentials
If you need a nats credential for authentication:
natskafka:
nats:
servers:
- "nats://1.2.3.4:4222"
credentials:
secret:
name: nats-sys-creds
key: sys.creds
connect:
- type: "NATSToKafka"
brokers:
- "1.2.3.4:9092"
id: whizz
topic: bar
subject: bang
- type: "KafkaToNATS"
brokers:
- "1.2.3.4:9092"
id: foo
topic: bar
subject: baz
Deploy nats-kafka with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has nats-kafka on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartnats-kafka is pinned at v0.15.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply