What will be the number of Kafka broker pods created in the Kubernetes cluster?
medium
A. 3
B. 0
C. 6
D. 1
Solution
Step 1: Identify Kafka replicas in YAML
The replicas field under kafka is set to 3, meaning 3 Kafka broker pods.
Step 2: Understand pod creation
Strimzi creates one pod per replica, so 3 Kafka broker pods will be created.
Final Answer:
3 -> Option A
Quick Check:
Kafka replicas = 3 pods [OK]
Hint: Kafka replicas number = Kafka pods count [OK]
Common Mistakes:
Adding Kafka and Zookeeper replicas together
Confusing ephemeral storage with pod count
Assuming default pod count if replicas missing
4. You applied a Kafka cluster YAML with 3 replicas, but only 1 Kafka pod is running. Which of the following is the most likely cause?
medium
A. Kafka storage type is set to ephemeral
B. The YAML file has replicas: 1 under Kafka section
C. Zookeeper replicas are set to 1
D. Strimzi operator is not installed or running
Solution
Step 1: Check Kafka replicas in YAML
If YAML specifies 3 replicas, pod count should be 3, so replicas: 1 is unlikely.
Step 2: Consider Strimzi operator role
Strimzi operator manages Kafka pods. If it is missing or not running, pods won't be created properly.
Final Answer:
Strimzi operator is not installed or running -> Option D
Quick Check:
Operator missing = pods not managed [OK]
Hint: Check Strimzi operator status if pods don't match replicas [OK]
Common Mistakes:
Blaming Zookeeper replicas for Kafka pod count
Thinking ephemeral storage stops pod creation
Assuming YAML replicas value is always correct
5. You want to update your Kafka cluster managed by Strimzi to use persistent storage instead of ephemeral. Which YAML snippet correctly changes the Kafka storage to persistent with 10Gi volume size?
hard
A. storage:
type: persistent-claim
size: 10Gi
B. storage:
type: persistent-claim
volumeClaimTemplate:
spec:
resources:
requests:
storage: 10Gi