Kafka REST ConfigMap
You can customize the kafkarest config files by editing the
kafkarest-cm ConfigMap. Adding a file to the data
section of kafkarest-cm copies the file contents to
/opt/mapr/kafka-rest/kafka-rest-5.1.2/config/ and overrides the existing
files after pod restart.
The following example customizes the
/opt/mapr/kafka-rest/kafka-rest-5.1.2/config/kafka-rest.properties
file:
- Add the customized
kafka-rest.propertiescontent in thedatasection by editing the existingkafkarest-cm: $ kubectl -n dataplatform edit cm kafkarest-cm:... ApiVersion: v1 data: kafka-rest.properties: | listeners=https://0.0.0.0:8082 authentication.enable=true impersonation.enable=true schema.registry.enable=false streams.default.stream=/st headers.file=/opt/mapr/kafka-rest/kafka-rest-5.1.2/config/headers.xml host.name=kafkarest-svc.dataplatform.svc.cluster.local kind: ConfigMap metadata: ... - Restart the
kafkarestpods:$ kubectl delete pods -n dataplatform kafkarest-0 - Check the
kafkarestconfig file:$ kubectl -n dataplatform exec --stdin --tty kafkarest-0 -- /bin/bash $ cat /opt/mapr/kafka-rest/kafka-rest-5.1.2/config/kafka-rest.properties listeners=https://0.0.0.0:8082 authentication.enable=true impersonation.enable=true schema.registry.enable=false streams.default.stream=/st headers.file=/opt/mapr/kafka-rest/kafka-rest-5.1.2/config/headers.xml host.name=kafkarest-svc.dataplatform.svc.cluster.local