Is there a reason why I can't get to my echoserver thru internal Azure AKS load balancer http://10.61.1.97:30446 and I can get directly to the endpoint 10.61.1.14:8080 or 10.61.1.53:8080 ?
~$ kubectl get ep echoserver
NAME ENDPOINTS AGE
echoserver 10.61.1.14:8080,10.61.1.53:8080 46h
~$ kubectl get svc echoserver-lb
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
echoserver-lb LoadBalancer 192.168.172.103 10.61.1.97 8080:30446/TCP 6m30s
My load balancer apparently points to endpoints , see below ?
~$ kubectl describe svc echoserver-lb
...
LoadBalancer Ingress: 10.61.1.97
Port: <unset> 8080/TCP
TargetPort: 8080/TCP
NodePort: <unset> 30446/TCP
Endpoints: 10.61.1.14:8080,10.61.1.53:8080
...
Actually, you just need to use the command kubectl get service echoserver-lb
and get the EXTERNAL-IP. Then you can access the service in from the Azure VM that in the same virtual network with the AKS through the command "curl EXTERNAL-IP".
In your case, the command should be curl 10.61.1.97:8080
. In addition, you do not need to create the internal load balancer yourself, just set the load balancer in the yaml file for the application and then the AKS will create for you. You also need to pay attention to the permission that access your application from the subnet which your VM in.
You can follow the example Deploying Internal Applications with private IPs on Azure Kubernetes Service (AKS). Hope this will help you.