private String getZookeeperUrl(final Map<String, String> annotations, final Request request) {
        String zookeeperK8sUrl = annotations.get(IngressConstants.ZOOKEEPER_REGISTER_ADDRESS);
        String zookeeperUrl = null;
        String zookeeperK8sIpUrl = getZookeeperHost(zookeeperK8sUrl);
        if (isCompleteHost(zookeeperK8sIpUrl)) {
            zookeeperUrl = annotations.get(IngressConstants.ZOOKEEPER_REGISTER_ADDRESS);
        } else {
            Lister<V1Endpoints> endpointsLister = ingressParser.getEndpointsLister();
            LOG.info("endpointsLister:{}", JsonUtils.toJson(endpointsLister));
            Lister<V1Endpoints> namespace = endpointsLister.namespace(request.getNamespace());
            LOG.info("namespace:{}", JsonUtils.toJson(namespace));
            V1Endpoints v1Endpoints = namespace.get(zookeeperK8sIpUrl);
            List<V1EndpointSubset> subsets = v1Endpoints.getSubsets();
            if (Objects.isNull(subsets) || CollectionUtils.isEmpty(subsets)) {
                LOG.info("Endpoints do not have subsets");
            } else {
                for (V1EndpointSubset subset : subsets) {
                    List<V1EndpointAddress> addresses = subset.getAddresses();
                    if (Objects.isNull(addresses) || addresses.isEmpty()) {
                        continue;
                    }
                    for (V1EndpointAddress address : addresses) {
                        zookeeperUrl = address.getIp();
                    }
                }
            }
        }
        if (!isCompleteHost(zookeeperUrl)) {
            LOG.info("Please enter the correct zookeeperUrl address");
            throw new ShenyuException("zookeeper url:" + zookeeperUrl + " is is error.");
        }
        zookeeperUrl = replaceZookeeperHost(zookeeperK8sUrl, zookeeperUrl);
        return zookeeperUrl;
    }
get zookeeper Url.
@param annotations annotations from k8s
@param request request
@return ip form of zookeeper Url
shenyu-kubernetes-controller/src/main/java/org/apache/shenyu/k8s/reconciler/IngressReconciler.java