do not get public ip while creating service load balancer

2/13/2021

Hi I have followed this video from starting to end. Using kubectl describe to show the Service that was created yields

$ kubectl describe -n ingress-nginx service/ingress-nginx
Name:                     ingress-nginx
Namespace:                ingress-nginx
Labels:                   <none>
Annotations:              <none>
Selector:                 app=nginx-ingress
Type:                     LoadBalancer
IP:                       10.110.231.177
LoadBalancer Ingress:     localhost
Port:                     http  80/TCP
TargetPort:               http/TCP
NodePort:                 http  32352/TCP
Endpoints:                10.1.0.12:80,10.1.0.13:80
Port:                     https  443/TCP
TargetPort:               https/TCP
NodePort:                 https  30563/TCP
Endpoints:                10.1.0.12:443,10.1.0.13:443
Session Affinity:         None
External Traffic Policy:  Local
HealthCheck NodePort:     30574
Events:                   <none>

Why did not I get a public IP address as explained by the author of the video? Is that why I am not able to access the link http://marcel.test?

Also while doing the same setup on AWS, the external IP stays at Pending for a LoadBalancer service.

-- Shubham Arora
docker-desktop
docker-for-windows
kubernetes
nginx-ingress

1 Answer

2/14/2021

The host file I was using was incorrect , as I was using git bash I vim into /etc/hosts but actually the hosts file in windows is C:\Windows\System32\drivers\etc so I updated the host file with 127.0.0.1 marcel.test and it worked

-- Shubham Arora
Source: StackOverflow