Welcome to the Linux Foundation Forum!

Lab 6.6 Create a newLoadBalancerservice to expose the newly created deployment. Test that it works.

neetika
neetika Posts: 3
edited August 2022 in LFD259 Class Forum

My LoadBalancer's External-IP is in pending status and when I try to curl on loadbalancer's CLUSTER-IP , It returns error Connection Refused .

k get service
NAME                 TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
nginx                ClusterIP      10.100.23.116   <none>        80/TCP         8d
nginx-loadbalancer   LoadBalancer   10.96.200.240   <pending>     80:30487/TCP   11h

generic@kube-master:~$ curl http://10.96.200.240:80
curl: (7) Failed to connect to 10.96.200.240 port 80: Connection refused
generic@kube-master:~$ curl http://10.96.200.240:30487

--- second query never returns

Can some one help ?

Best Answer

  • neetika
    neetika Posts: 3
    edited August 2022 Answer ✓

    Got it resolved by swapping port and target port.

    generic@kube-master:~/LFD259/SOLUTIONS/s_06$ k get  service
    NAME                  TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
    nginx                 ClusterIP      10.100.23.116    <none>        80/TCP           8d
    nginx-loadbalancer    LoadBalancer   10.96.200.240    <pending>     8080:30063/TCP   11h
    

Categories

Upcoming Training