curl to external IP failed (curl: (7) Failed to connect to 35.188.42.26 port 8080: Connection refused)

4/15/2020

I have searched for this issue and seen solutions, but I am not able to figure out the issue. Basically I am not able to curl to the external IP/Port that I have created with replica controller (I am aware that this is going to be deprecated, trying to start from scratch).

$ kubectl run kubia-container --image=australia/kubia_py --port=8080 --generator=run/v1
kubectl run --generator=run/v1 is DEPRECATED and will be removed in a future version. Use kubectl run --generator=run-pod/v1 or kubectl create instead.
replicationcontroller/kubia-container created

$ kubectl get pods
NAME          READY  STATUS  RESTARTS  AGE
kubia-container-6b2cs  1/1   Running  0     25s

$ kubectl expose rc kubia-container --type=LoadBalancer --name kubia-http
service/kubia-http exposed

$ kubectl get pods,svc,rc
NAME            READY  STATUS  RESTARTS  AGE
pod/kubia-container-6b2cs  1/1   Running  0     93m

NAME         TYPE      CLUSTER-IP  EXTERNAL-IP  PORT(S)     AGE
service/kubernetes  ClusterIP   10.0.0.1   <none>     443/TCP     6h28m
service/kubia-http  LoadBalancer  10.0.4.238  35.188.42.26  8080:30030/TCP  91m

$ curl 35.188.42.26:8080
curl: (7) Failed to connect to 35.188.42.26 port 8080: Connection refused
-- asif syed
curl
google-kubernetes-engine

0 Answers