0

I am using minikube in VM-ware workstation 17 player (Ubuntu OS). When I expose my container on containerPort: 80, I am getting an error "curl: (7) Failed to connect to 10.244.0.49 port 80 after 21041 ms: Connection refused". Please help me to resolve my error...

I used $kubectl get pods -o wide $curl --ipv4 10.244.0.49:80 (Private ip of pod) But it is not working.

1 Answers1

0

You can not access a service hosted in Minikube without creating a tunnel. You need to keep in mind that Minikube runs within a virtual machine (VM), and its network is separate from your host machine.

You created a Deployment and successfully created NodePort Service.

You need not create a tunnel by following command:

minikube service serviceNodePort --url

Try to open http://127.0.0.1:TUNNEL_Port into your browser.

Here is the official minikube Documentation