I am trying to automate kafka topic creation using jikkou. I am using below docker file for build.
# Use the base image for Jikkou API Server
FROM streamthoughts/jikkou-api-server:main
# Copy the configuration file into the container
#COPY jikkou-config.yml /config/jikkou-config.yml
COPY kafka-topics.yml /config/kafka-topics.yml
# Set the environment variable to point to the Jikkou configuration file
#ENV JIKKOU_CONFIGURATION=/config/jikkou-config.yml
# Use ENTRYPOINT to ensure the base application runs
#ENTRYPOINT ["java", "-jar", "/path-to-jikkou-api-server.jar"]
# Default command to apply Kafka topic configurations using Jikkou
CMD ["jikkou", "apply", "--files", "/config/kafka-topics.yml"]
I am trying to create a sample topic in kafka cluster, but jikkou could not access to kafka cluster -
apiVersion: io.streamthoughts.jikkou/v1beta1
kind: ResourceList
resources:
# Kafka connection configuration
- apiVersion: jikkou.io/v1beta1
kind: KafkaConfiguration
metadata:
name: kafka-cluster
spec:
bootstrap.servers: "localhost:9092"
security.protocol: PLAINTEXT
# Define a Kafka topic
- apiVersion: kafka.jikkou.io/v1beta2
kind: KafkaTopic
metadata:
name: test-topic-20012025
spec:
partitions: 3
replicas: 2
config:
cleanup.policy: "delete"
retention.ms: "604800000" # 7 days
max.message.bytes: "1048576"
Could you please guide me what am i doing wrong. I could able to create same topic using cli.
Please let me know if there are any issues in my code or provide me a sample config file if you have.
Many Thanks!!