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?

Thanks,
Trung.

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 -

thanks
pb

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

regards,
pb

Hello @pb-narayan,

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

Thanks,
Trung.

Tried minikube service {service-name} --url

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

Thanks,
Trung.

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.