Getting failed to connect error with curl in Services

i am getting this error when i curl, services seems to be configured properly. what could be the reason need help with this

Hello @pb-narayan ,

Can you share how you set up the k8s cluster and how did you expose your svc?


pl find the screenshots attached. Also pl note both yaml.
when i said kubectl expose service/myapp-service1, i got the message service “already exists”

this is the second screenshot

This is the third screen shot

also i disabled firewall etc -


I have posted the screenshots, hope there is no error, totally new to k8.


Hello @pb-narayan,

As you have your cluster setup with minikube, can you please check this instructions if it work for your case?


Tried minikube service {service-name} --url

[email protected] ~ % kubectl get service    
NAME            TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)        AGE
kubernetes      ClusterIP      <none>        443/TCP        26d
nginx-service   NodePort   <none>        80:30224/TCP   7d5h
[email protected] ~ % minikube service nginx-service --url
❗  Because you are using a Docker driver on darwin, the terminal needs to be open to run it.


thanks i got the following output, but when i use nginx image in command line i am not getting any output in the browser but with the one in the link (Accessing apps | minikube) othewise, i am getting the output as mentioned: hope it is correct output. why is nginx not showing up on browser,

I think this is only partial output, or something is missing, what could be missing
(will take a refresher course on networking/ports/tcp ip)

It seems that you’re not using the image nginx based on your screenshot. make sure that you’re using the right service.