Adding loadbalancer prevents Kafka StatefulSet from being created #6478
-
Describe the bug Removing the loadbalancer listener then allows the Kafka StatefulSet to be created, but I need the loadbalancer listener. This seems to occur because of an order of operations issue between the LoadBalancer resources and Kafka StatefulSet. When the LoadBalancer service is created, it goes into Pending state until the Endpoints are created. Those endpoints cannot be created until Pods exist that match the Selector configuration of the LoadBalancer. However, no Pods will ever exist since the strimzi-kafka-operator is stuck waiting on the LoadBalancer to show To Reproduce
listeners:
- name: plain
port: 9092
type: internal
tls: false
- name: tls
port: 9093
type: internal
tls: true
- name: external
port: 9094
type: loadbalancer
tls: false
configuration:
externalTrafficPolicy: Local
bootstrap:
loadBalancerIP: 10.100.10.3
brokers:
- broker: 0
loadBalancerIP: 10.100.10.4
listeners:
- name: plain
port: 9092
type: internal
tls: false
- name: tls
port: 9093
type: internal
tls: true
Expected behavior Environment (please complete the following information):
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: strimzi-kafka-operator
namespace: strimzi-kafka
spec:
interval: 15m
chart:
spec:
chart: strimzi-kafka-operator
sourceRef:
kind: HelmRepository
name: strimzi
namespace: strimzi-kafka
interval: 15m
values:
logLevel: DEBUG
fullReconciliationIntervalMs: 120000
operationTimeoutMs: 300000
nodeSelector:
kubernetes.io/os: linux
watchAnyNamespace: true
YAML files and logs Custom Resource (using ---
apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
name: my-app
namespace: default
spec:
entityOperator:
topicOperator: {}
userOperator: {}
kafka:
config:
default.replication.factor: 1
inter.broker.protocol.version: "3.1"
min.insync.replicas: 1
offsets.topic.replication.factor: 1
transaction.state.log.min.isr: 1
transaction.state.log.replication.factor: 1
listeners:
- name: plain
port: 9092
tls: false
type: internal
- name: tls
port: 9093
tls: true
type: internal
- name: external
port: 9094
type: loadbalancer
tls: false
configuration:
externalTrafficPolicy: Local
bootstrap:
loadBalancerIP: 10.100.10.3
brokers:
- broker: 0
loadBalancerIP: 10.100.10.4
replicas: 1
storage:
type: jbod
volumes:
- class: persistent-standard
deleteClaim: true
id: 0
size: 1Gi
type: persistent-claim
zookeeper:
replicas: 1
storage:
class: persistent-standard
deleteClaim: false
size: 10Gi
type: persistent-claim Logs (using
Custom Resource (not using ---
apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
name: my-app
namespace: default
spec:
entityOperator:
topicOperator: {}
userOperator: {}
kafka:
config:
default.replication.factor: 1
inter.broker.protocol.version: "3.1"
min.insync.replicas: 1
offsets.topic.replication.factor: 1
transaction.state.log.min.isr: 1
transaction.state.log.replication.factor: 1
listeners:
- name: plain
port: 9092
tls: false
type: internal
- name: tls
port: 9093
tls: true
type: internal
replicas: 1
storage:
type: jbod
volumes:
- class: persistent-standard
deleteClaim: true
id: 0
size: 1Gi
type: persistent-claim
zookeeper:
replicas: 1
storage:
class: persistent-standard
deleteClaim: false
size: 10Gi
type: persistent-claim Logs (not using
Additional context The example without the loadbalancer is to demonstrate that things can create successfully - and that this does seem to be an order of operations bug. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is not a bug. You platform did not created the loadbalancer and provided its address in its status. So Strimzi cannot proceed and create the Kafka brokers. When you list your services with |
Beta Was this translation helpful? Give feedback.
This is not a bug. You platform did not created the loadbalancer and provided its address in its status. So Strimzi cannot proceed and create the Kafka brokers. When you list your services with
kubectl get service -o wide
you should check theEXTERNAL-IP
column. It needs to have an IP address or a DNS address in it. If it doesn't and has something like<pending>
then the load balancer is not provisioned by the platform.