unable to access Azure kubernetes load balancer external ip from internet

10/27/2019

i have created a K8s Cluster with multinode pool since i need to work with windows containers. the windows node pool has 1 node. i have created the deployment and the service with type Load Balancer which has got the external IP upon deployment. but when i ping the external IP from my laptop i get a request timed out. I have certain WCF microservices which need to access the services deployed in the windows containers and vice versa. since i am not able to ping the Load balancer IP from my machine, i doubt the WCF microservices would too. i was not able to ping this external IP from the Azure VM that has these external microservices running. Can we ping the external IP which is assigned to the K8s Load balancer from the internet. If so do i need to make additional configuration changes to my cluster or Vnet/subnet?

i also created a public static IP and assigned to the service yaml. this static IP i have also passed in the deployment file as an environment variable such that the other WCF microservices know the IP address they need to communicate back with.

PS Azure:\> kubectl get service myservice --watch
NAME                TYPE           CLUSTER-IP   EXTERNAL-IP      PORT(S)                                                                         AGE
myservice   LoadBalancer   10.0.0.50    20.185.104.254   9163:30733/TCP,23010:30526/TCP   2d8h
PS Azure:\> kubectl describe service myservice
Name:                     myservice
Namespace:                default
Labels:                   app=myservice
Annotations:              kubectl.kubernetes.io/last-applied-configuration:
                            {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"app":"myservice"},"name":"myservice","namespac...
Selector:                 app=myservice
Type:                     LoadBalancer
IP:                       10.0.0.50
LoadBalancer Ingress:     20.185.104.254
Port:                     svcproxy  9163/TCP
TargetPort:               9163/TCP
NodePort:                 svcproxy  30733/TCP
Endpoints:                <none>
Port:                     banyan  23010/TCP
TargetPort:               23010/TCP
NodePort:                 banyan  30526/TCP
Endpoints:                <none>
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   <none>
Azure:/

expected - should be able to ping the external IP.

Actual - not able to do so 100% packet loss

C:\windows\system32>ping 20.185.104.254

Pinging 20.185.104.254 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 20.185.104.254:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)
-- RAnand
kubernetes
kubernetes-ingress
kubernetes-service

1 Answer

10/28/2019

Check your inbound firewall rules. Most likely you have blocked inbound traffic.

-- Rodrigo Loza
Source: StackOverflow