<p>I am just setting two simple services on Mac using minikube</p>
<p>I have the service set up and I can access it via ingress / minikube tunnel . So i know the service works</p>
<p>I am using Spring Boot 3, with the  so i need to specify the <code>spring-cloud-starter-kubernetes-all</code> package. This means I need to specify a url for <code>spring.cloud.kubernetes.discovery.discovery-server-url </code></p>
<p>When i try to do the simple call to</p>
<p><code>discoveryClient.getServices()</code></p>
<p>I get the error &quot;Connection refused <a href="https://kubernetes.docker.internal:6443/apps%22" rel="nofollow noreferrer">https://kubernetes.docker.internal:6443/apps&quot;</a></p>
<p>&quot;apps&quot; is my second service</p>
<p>It is refusing connection to the value of <code>spring.cloud.kubernetes.discovery.discovery-server-url</code></p>
<p>At the moment i have this set to <code>spring.cloud.kubernetes.discovery.discovery-server-url=https://kubernetes.docker.internal:6443</code></p>
<p>I am assuming this is incorrect and I need some help as to what is the correct url to set this to / or the correct place to find this. I thought this would be the internal url.</p>

duckdivesurvive
<p>You are trying to configure your discovery client with the Kubernetes API server URL, which is incorrect.
Your client application needs to be connected to <strong>Spring Cloud Kubernetes Discovery Server</strong>.
It's an independent application that will work like a <strong>proxy</strong> between your client SpringBoot apps and Kubernetes.
You can find its images here: <a href="https://hub.docker.com/r/springcloud/spring-cloud-kubernetes-discoveryserver/tags" rel="nofollow noreferrer">https://hub.docker.com/r/springcloud/spring-cloud-kubernetes-discoveryserver/tags</a>
And it should be deployed to Kubernetes via yaml file.</p>
<p>Then you can configure
<code>spring.cloud.kubernetes.discovery.discovery-server-url</code>
with this discovery server URL. That URL will most likely come from a Kubernetes service that you will create for the discovery server application.</p>
<p>Please, find the full deployment YAML and the related documentation here:
<a href="https://spring.io/blog/2021/10/26/new-features-for-spring-cloud-kubernetes-in-spring-cloud-2021-0-0-m3" rel="nofollow noreferrer">https://spring.io/blog/2021/10/26/new-features-for-spring-cloud-kubernetes-in-spring-cloud-2021-0-0-m3</a></p>
<p>Please, let us know how that goes</p>
