apache-kafkaminikubestrimzi

Unknown feature gate KafkaNodePools found in the configuration


I was trying to configure a KafkaNodePools functionality (and that's were probably working) using this guide -> click but now my cluster-operator falls with a error. How can I fix it?

> kubectl logs strimzi-cluster-operator-759856c456-lfxqx -n kafka
Exception in thread "main" io.strimzi.operator.common.InvalidConfigurationException: Unknown feature gate KafkaNodePools found in the configuration
        at io.strimzi.operator.common.featuregates.FeatureGates.<init>(FeatureGates.java:51)
        at io.strimzi.operator.common.config.ConfigParameter.get(ConfigParameter.java:89)
        at io.strimzi.operator.common.config.ConfigParameter.define(ConfigParameter.java:72)
        at io.strimzi.operator.cluster.ClusterOperatorConfig.buildFromMap(ClusterOperatorConfig.java:310)
        at io.strimzi.operator.cluster.ClusterOperatorConfig.buildFromMap(ClusterOperatorConfig.java:292)
        at io.strimzi.operator.cluster.Main.main(Main.java:62)
apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "25"
  creationTimestamp: "2024-11-08T15:41:13Z"
  generation: 25
  labels:
    app: strimzi
  name: strimzi-cluster-operator
  namespace: kafka
  resourceVersion: "331173"
  uid: 97ce684c-e542-4ac4-bc9e-e3314a844828
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      name: strimzi-cluster-operator
      strimzi.io/kind: cluster-operator
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      annotations:
        kubectl.kubernetes.io/restartedAt: "2025-01-03T21:20:24+03:00"
      creationTimestamp: null
      labels:
        name: strimzi-cluster-operator
        strimzi.io/kind: cluster-operator
    spec:
      containers:
      - args:
        - /opt/strimzi/bin/cluster_operator_run.sh
        env:
        - name: STRIMZI_FEATURE_GATES
          value: +KafkaNodePools
        - name: STRIMZI_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: STRIMZI_FULL_RECONCILIATION_INTERVAL_MS
          value: "120000"
        - name: STRIMZI_OPERATION_TIMEOUT_MS
          value: "300000"
        - name: STRIMZI_DEFAULT_KAFKA_EXPORTER_IMAGE
          value: quay.io/strimzi/kafka:0.45.0-kafka-3.9.0
        - name: STRIMZI_DEFAULT_CRUISE_CONTROL_IMAGE
          value: quay.io/strimzi/kafka:0.45.0-kafka-3.9.0
        - name: STRIMZI_KAFKA_IMAGES
          value: |
            3.8.0=quay.io/strimzi/kafka:0.44.0-kafka-3.8.0
            3.8.1=quay.io/strimzi/kafka:0.44.0-kafka-3.8.1
            3.9.0=quay.io/strimzi/kafka:0.45.0-kafka-3.9.0
        - name: STRIMZI_KAFKA_CONNECT_IMAGES
          value: |
            3.8.1=quay.io/strimzi/kafka:0.44.0-kafka-3.8.1
            3.8.0=quay.io/strimzi/kafka:0.44.0-kafka-3.8.0
            3.9.0=quay.io/strimzi/kafka:0.45.0-kafka-3.9.0
        - name: STRIMZI_KAFKA_MIRROR_MAKER_IMAGES
          value: |
            3.8.1=quay.io/strimzi/kafka:0.44.0-kafka-3.8.1
            3.8.0=quay.io/strimzi/kafka:0.44.0-kafka-3.8.0
            3.9.0=quay.io/strimzi/kafka:0.45.0-kafka-3.9.0
        - name: STRIMZI_KAFKA_MIRROR_MAKER_2_IMAGES
          value: |
            3.8.1=quay.io/strimzi/kafka:0.44.0-kafka-3.8.1
            3.8.0=quay.io/strimzi/kafka:0.44.0-kafka-3.8.0
            3.9.0=quay.io/strimzi/kafka:0.45.0-kafka-3.9.0
        - name: STRIMZI_DEFAULT_TOPIC_OPERATOR_IMAGE
          value: quay.io/strimzi/operator:0.45.0
        - name: STRIMZI_DEFAULT_USER_OPERATOR_IMAGE
          value: quay.io/strimzi/operator:0.45.0
        - name: STRIMZI_DEFAULT_KAFKA_INIT_IMAGE
          value: quay.io/strimzi/operator:0.45.0
        - name: STRIMZI_DEFAULT_KAFKA_BRIDGE_IMAGE
          value: quay.io/strimzi/kafka-bridge:0.31.1
        - name: STRIMZI_DEFAULT_KANIKO_EXECUTOR_IMAGE
          value: quay.io/strimzi/kaniko-executor:0.45.0
        - name: STRIMZI_DEFAULT_MAVEN_BUILDER
          value: quay.io/strimzi/maven-builder:0.45.0
        - name: STRIMZI_OPERATOR_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: STRIMZI_LEADER_ELECTION_ENABLED
          value: "true"
        - name: STRIMZI_LEADER_ELECTION_LEASE_NAME
          value: strimzi-cluster-operator
        - name: STRIMZI_LEADER_ELECTION_LEASE_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: STRIMZI_LEADER_ELECTION_IDENTITY
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        image: quay.io/strimzi/operator:0.45.0
        imagePullPolicy: IfNotPresent
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /healthy
            port: http
            scheme: HTTP
          initialDelaySeconds: 10
          periodSeconds: 30
          successThreshold: 1
          timeoutSeconds: 1
        name: strimzi-cluster-operator
        ports:
        - containerPort: 8080
          name: http
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /ready
            port: http
            scheme: HTTP
          initialDelaySeconds: 10
          periodSeconds: 30
          successThreshold: 1
          timeoutSeconds: 1
        resources:
          limits:
            cpu: "1"
            memory: 384Mi
          requests:
            cpu: 200m
            memory: 384Mi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /tmp
          name: strimzi-tmp
        - mountPath: /opt/strimzi/custom-config/
          name: co-config-volume
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: strimzi-cluster-operator
      serviceAccountName: strimzi-cluster-operator
      terminationGracePeriodSeconds: 30
      volumes:
      - emptyDir:
          medium: Memory
          sizeLimit: 1Mi
        name: strimzi-tmp
      - configMap:
          defaultMode: 420
          name: strimzi-cluster-operator
        name: co-config-volume
status:
  conditions:
  - lastTransitionTime: "2025-01-03T18:15:00Z"
    lastUpdateTime: "2025-01-03T18:15:00Z"
    message: Deployment does not have minimum availability.
    reason: MinimumReplicasUnavailable
    status: "False"
    type: Available
  - lastTransitionTime: "2025-01-03T18:10:41Z"
    lastUpdateTime: "2025-01-03T18:25:54Z"
    message: ReplicaSet "strimzi-cluster-operator-759856c456" is progressing.
    reason: ReplicaSetUpdated
    status: "True"
    type: Progressing
  observedGeneration: 25
  replicas: 2
  unavailableReplicas: 2
  updatedReplicas: 1

I was trying to fix it changing version of strimzi (because the internet said it could be a reason for a problem) but instead all my deployment has been crashed.

PS C:\Users\user> kubectl get pods -n kafka
NAME                                         READY   STATUS             RESTARTS        AGE
my-bridge-bridge-54fcdb8865-nkfbb            1/1     Running            122 (22m ago)   55d
my-cluster-dual-role-0                       1/1     Running            32 (24m ago)    19d
my-cluster-dual-role-1                       1/1     Running            86 (24m ago)    51d
my-cluster-dual-role-2                       1/1     Running            81 (24m ago)    51d
my-cluster-entity-operator-596ff884f-jtqcf   2/2     Running            346 (22m ago)   56d
strimzi-cluster-operator-6cfb7f8f4d-zr47s    0/1     CrashLoopBackOff   7 (4m ago)      14m
strimzi-cluster-operator-759856c456-lfxqx    0/1     CrashLoopBackOff   8 (4m39s ago)   20m

Solution

  • The KafkaNodePools feature gate has matured to GA and cannot be enabled / disabled anymore (the Kafka node pools are now always enabled). So you should remove it from the configuration. You can just remove the whole section:

            - name: STRIMZI_FEATURE_GATES
              value: +KafkaNodePools