[Bug] Kafka pod's cannot be created with custom (non-default) cluster domain
See original GitHub issueDescribe the bug I try to create a Kafka cluster through strimzi-kafka-operator in minikube. When operator tried to connect to zookeeper (on kafka’s pod-creation phase) it’s failed with error:
Failed to connect to Zookeeper
minikube-kafka-zookeeper-0.minikube-kafka-zookeeper-nodes.infra-kafka.svc:2181.
Connection was not ready in 300000 ms.
I think that the operator cannot resolve the zookeeper’s service name correctly, because it does not include the cluster domain suffix (in my environment it’s a “yc.minik”, not default “cluster.local”).
I checked these thoughts like this (inside zookeer’s container):
[kafka@minikube-kafka-zookeeper-0 kafka]$ nslookup minikube-kafka-zookeeper-0.minikube-kafka-zookeeper-nodes.infra-kafka.svc
Server: 10.96.0.10
Address: 10.96.0.10#53
** server can't find minikube-kafka-zookeeper-0.minikube-kafka-zookeeper-nodes.infra-kafka.svc: NXDOMAIN
[kafka@minikube-kafka-zookeeper-0 kafka]$ nslookup minikube-kafka-zookeeper-0.minikube-kafka-zookeeper-nodes.infra-kafka.svc.yc.minik
Server: 10.96.0.10
Address: 10.96.0.10#53
Name: minikube-kafka-zookeeper-0.minikube-kafka-zookeeper-nodes.infra-kafka.svc.yc.minik
Address: 172.17.0.15
To Reproduce Steps to reproduce the behavior:
- Launch minikube with custom dns-domain suffix, like:
minikube start --dns-domain='yc.minik'
- Install strimzi kafka operator through Helm or other way (but remember to set deployment’s env-variable KUBERNETES_SERVICE_DNS_DOMAIN=‘yc.minik’):
helm install kafka-operator -n infra-kafka --set-string kubernetesServiceDnsDomain='yc.minik' strimzi/strimzi-kafka-operator
- Create something like:
cat << EOF | kubectl create -n infra-kafka -f -
apiVersion: kafka.strimzi.io/v1beta1
kind: Kafka
metadata:
name: minikube-kafka
namespace: infra-kafka
spec:
kafka:
version: 2.4.0
replicas: 1
resources:
limits:
cpu: "200m"
memory: "1Gi"
requests:
cpu: "50m"
memory: "64Mi"
listeners:
plain: {}
tls: {}
config:
offsets.topic.replication.factor: 1
transaction.state.log.replication.factor: 1
transaction.state.log.min.isr: 1
log.message.format.version: "2.4"
storage:
type: ephemeral
zookeeper:
replicas: 1
resources:
limits:
cpu: "200m"
memory: "1Gi"
requests:
cpu: "50m"
memory: "64Mi"
storage:
type: ephemeral
entityOperator:
topicOperator: {}
userOperator: {}
EOF
- See that no kafka’s pod will created by operator
Expected behavior Kafka cluster created and running successfully.
Environment (please complete the following information):
- Strimzi version: 0.17.0
- Installation method: Helm chart
- Kubernetes cluster: Kubernetes 1.16.8
- Infrastructure: Minikube
YAML files and logs Reports files attached. report-13-04-2020_22-07-46.zip
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Troubleshoot Confluent for Kubernetes
The ConfluentRolebindings custom resources (CRs) can be stuck in the DELETING state if associated Kafka cluster is removed. Solution: Manually remove the ...
Read more >Ingress Operator in OpenShift Container Platform
The domain value must be unique among all Ingress Controllers and cannot be updated. If empty, the default value is ingress.config.openshift.io/cluster .spec.
Read more >RHSA-2021:3759 - Security Advisory - Red Hat Customer Portal
Moderate: OpenShift Container Platform 4.9.0 bug fix and security ... openshift cluster to 4.6.4 the openshift marketplace pods are in ...
Read more >Running Kafka on dedicated Kubernetes nodes - Strimzi
Strimzi provides a way to run an Apache Kafka cluster on Kubernetes in various deployment configurations.
Read more >Spring Cloud Kubernetes
Kubernetes PropertySource implementations. The most common approach to configuring your Spring Boot application is to create an application.properties or ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also investigated this problem more deeply and agree that this is issue in the minikube.
For anybody who googled this page 😃 I solved the issue by running minikube like this:
So, an important option is
--extra-config='kubelet.cluster-domain=yc.minik'
. After this I successfully run Kafka cluster in the Minikube 😃@scholzj Thank you very much for the right direction about this issue 😃
Thanks for investigating anf updating the issue. Much appreciated!