Strimzi-kafka-operator: Help creating topic

Created on 10 Apr 2019  路  3Comments  路  Source: strimzi/strimzi-kafka-operator

I'm having difficulty creating a topic via Topic Operator.
using version v0.11.1 of the cluster operator, kafka, zookeeper and entity operator are up.
cluster operator created for multi namespace according to docs
yaml for Kafka:

apiVersion: kafka.strimzi.io/v1alpha1
kind: Kafka
metadata:
  name: kf
spec:
  kafka:
    version: 2.1.0
    replicas: 3
    listeners:
      plain: {}
      tls: {}
    config:
      delete.topic.enable: true
      offsets.topic.replication.factor: 3
      transaction.state.log.replication.factor: 3
      transaction.state.log.min.isr: 2
      log.message.format.version: "2.1"
    storage:
      type: persistent-claim
      size: 100Gi
      deleteClaim: false
    jvmOptions:
      gcLoggingEnabled: false
  zookeeper:
    replicas: 3
    storage:
      type: persistent-claim
      size: 100Gi
      deleteClaim: false
  entityOperator:
    topicOperator:
      watchedNamespace: default
    userOperator: {}

topic yaml

apiVersion: kafka.strimzi.io/v1beta1
kind: KafkaTopic
metadata:
  name: orders
  labels:
    strimzi.io/cluster: my-cluster
spec:
  partitions: 10
  replicas: 2

kubectl get crds
NAME AGE
applications.app.k8s.io 19h
backendconfigs.cloud.google.com 21d
kafkaconnects.kafka.strimzi.io 16h
kafkaconnects2is.kafka.strimzi.io 16h
kafkamirrormakers.kafka.strimzi.io 16h
kafkas.kafka.strimzi.io 16h
kafkatopics.kafka.strimzi.io 16h
kafkausers.kafka.strimzi.io 16h
scalingpolicies.scalingpolicy.kope.io 21d

whenever I try to apply the topic I get:
error: unable to recognize "topic.yml": no matches for kind "KafkaTopic" in version "kafka.strimzi.io/v1beta1"

Any help is appreciated, thanks.

Most helpful comment

Looks like for Strimzi version 0.11.1 apiVersion must be kafka.strimzi.io/v1alpha1 not v1beta1.

All 3 comments

Looks like for Strimzi version 0.11.1 apiVersion must be kafka.strimzi.io/v1alpha1 not v1beta1.

That is correct. The v1beta1 resources are available currently only in master. For the example files for 0.11.1, please check the 0.11.1 tag or download the release zips which contain them as well.

thanks for the fast reply

Was this page helpful?
0 / 5 - 0 ratings