kwt
kwt copied to clipboard
Cant get pod A records to resolve
Is this supported by kwt ?
dns lookup via kubedns directly :
> docker exec -it kind-control-plane2 dig kafka-kafka-0.kafka-kafka-brokers.drivenow-staging-z.svc.cluster.local @10.244.1.2
...
;; QUESTION SECTION:
;kafka-kafka-0.kafka-kafka-brokers.drivenow-staging-z.svc.cluster.local. IN A
;; ANSWER SECTION:
kafka-kafka-0.kafka-kafka-brokers.drivenow-staging-z.svc.cluster.local. 8 IN A 10.244.2.24
;; Query time: 0 msec
;; SERVER: 10.244.1.2#53(10.244.1.2)
...
dns lookup via kwt net
> dig kafka-kafka-0.kafka-kafka-brokers.drivenow-staging-z.svc.cluster.local
...
;; QUESTION SECTION:
;kafka-kafka-0.kafka-kafka-brokers.drivenow-staging-z.svc.cluster.local. IN A
;; Query time: 10 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
...
seems like this format uses pod subdomain. it's currently not supported. here is current impl: https://github.com/k14s/kwt/blob/70f7ebd4c7a6886c14557e0ffe29c9bea3d49771/pkg/kwt/kubedns/kubedns_ip_resolver.go#L44
other solution uses headless service, but it's also not supported, so it's kind of no way to use Kafka in development with this tool :(