I have a minikube cluster containing multiple services:
# kubectl get services
NAME         TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
service1     NodePort    10.96.123.85     <none>        8080:32157/TCP   13d
service2     ClusterIP   10.96.0.1        <none>        8081/TCP         13d
# minikube ip
172.18.77.222
# kubectl get pods
NAME                        READY   STATUS             RESTARTS   AGE
application1-aaaaa-bbbbb    1/1     Running            1          121m
application2-aaaaa-bbbbb    1/1     Running            1          112mI want to call application1 from application2 via minikube ip and NodePort. (http://172.18.77.222:32157)
(Application1 is a Keycloak server. The issuer field in ACCESS_TOKEN contains the "external" minikube url "http://172.18.77.222:32157", therefore keycloak accept only calls sent to 172.18.77.222:32157)
How can I access
from application2?
You can use consul for service discovery if you want to call functionality from another service . The Consul helm chart must be deployed (once in the Cluster) to allow Service Discovery between the your services. https://www.consul.io/docs/k8s