<p>I deployed a spring boot app in kubernetes pod. But normally I access any app in this way of proxy port forwarding  -</p>

<p><a href="http://192.64.125.29:8001/api/v1/namespaces/kube-system/services/https:hello-app:/proxy/" rel="nofollow noreferrer">http://192.64.125.29:8001/api/v1/namespaces/kube-system/services/https:hello-app:/proxy/</a></p>

<p>But my spring boot app is running in this below url -</p>

<p><a href="http://192.64.125.29:8001/api/v1/namespaces/kube-system/services/https:myspringbootapp:/proxy/" rel="nofollow noreferrer">http://192.64.125.29:8001/api/v1/namespaces/kube-system/services/https:myspringbootapp:/proxy/</a></p>

<p>But I have no idea how to invoke my controller end point /visitid</p>

Gopi
<p>If you are just trying to do a quick check then you can <a href="https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/" rel="nofollow noreferrer">port-forward to the pod</a> - do <code>kubectl get pods</code> to find the pod name and then <code>kubectl port-forward &lt;pod-name&gt; 8080:8080</code> or whatever port you use if not 8080. Then you can hit your endpoint in your browser or with curl on localhost. For example, if you have the spring boot actuator running you could go to <code>http://localhost:8080/actuator/health</code>.</p>

<p>If you are trying to access the Pod through the Service then you can <a href="https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/#forward-a-local-port-to-a-port-on-the-pod" rel="nofollow noreferrer">port-forward to the Service</a> but you may want to expose the Service externally. You'll want to pick <a href="https://medium.com/google-cloud/kubernetes-nodeport-vs-loadbalancer-vs-ingress-when-should-i-use-what-922f010849e0" rel="nofollow noreferrer">how to expose it externally</a> and set that up. Then you'll have an external URL you can use and won't need to go via the kube internal APIs.</p>

<p>It is also possible <a href="https://kubernetes.io/docs/tasks/administer-cluster/access-cluster-services/#manually-constructing-apiserver-proxy-urls" rel="nofollow noreferrer">to construct a URL to hit the Service when proxying with <code>kubectl proxy</code></a>. For example you could hit the actuator on a spring boot app using http (not https) with <code>api/v1/namespaces/&lt;namespace&gt;/services/&lt;http:&gt;&lt;service_name&gt;:&lt;port_name&gt;/proxy/actuator/health</code>. The <code>&lt;port_name&gt;</code> will be in the service spec and you'll find it in the output of <code>kubectl describe service</code>.</p>
