private URI getURI(final KubernetesInstance instance) {
        boolean secure = instance.isSecure();
        String scheme = secure ? "https" : "http";
        int port = instance.getPort();
        if (port <= 0) {
            port = secure ? 443 : 80;
        }
        String uri = String.format("%s://%s:%s", scheme, instance.getHost(), port);
        return URI.create(uri);
    }
The type kubernetes instance register repository.
shenyu-registry/shenyu-registry-kubernetes/src/main/java/org/apache/shenyu/registry/kubernetes/KubernetesInstanceRegisterRepository.java