You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# replace the IP and port with what was returned in the earlier kubectl command
/stackable/zookeeper/bin/zkCli.sh -server 172.18.0.2:30504 ls /
The client will fail to connect due to an invalid name.
Explanation
The ZooKeeper client is doing a reverse DNS lookup on the IP provided in the command line, and then using that to connect to ZooKeeper. But the reverse DNS record is not in the SAN entries (this is expected).
@nightkr: in this case it seems to come up because it's running on the same control plane node as the apiserver, but pretty sure any hostNetworking pod that uses a service in the same way would trigger the same bug.
Considerations:
Document that ZK cannot be exposed when the Listener reports back an IP address instead of hostname.
This is actually a problem caused by ZooKeeper client (ie: what is called via
zkCli.sh)Problem
Accessing a cluster with valid SAN entry:
using the Zookeeper Client:
results in a connection failure:
Steps to reproduce
Deploy a
ZookeeperClusterwith a listenerClass ofexternal-unstableon a KinD cluster and with TLS enabled:Note
todo: add complete minimal example.
FWIW, I launched this with:
And then manually updated the
listenerClasson theZookeeperCluster.Get the node hostname (in this case, IP) and node port:
kubectl -n kuttl-test-musical-stork get listener test-zk-server -o 'jsonpath={.status.ingressAddresses[0].address}:{.status.nodePorts.zk}'Shell into the first replica, and run:
and then
# replace the IP and port with what was returned in the earlier kubectl command /stackable/zookeeper/bin/zkCli.sh -server 172.18.0.2:30504 ls /The client will fail to connect due to an invalid name.
Explanation
The ZooKeeper client is doing a reverse DNS lookup on the IP provided in the command line, and then using that to connect to ZooKeeper. But the reverse DNS record is not in the SAN entries (this is expected).
Considerations:
-Dzookeeper.sasl.client.canonicalize.hostname=falseto no avail.Add Reverse DNS entries to TLS certificate SANs.The reverse DNS record is not a reliable identifier to base trust on.